search for: poisnum

Displaying 2 results from an estimated 2 matches for "poisnum".

Did you mean: poisnums
2004 Feb 24
2
matrix() Help
...matrix. y in this case would be 3, 1, and 4; so the resulting matrix should be such that the first row has three different Normal numbers; the second row has 1 Normal number; and the third row has four different Normal numbers. I have the following code to do that: > matrix2 <- matrix(rnorm(poisNums),nrow=3,ncol=8) To my surprise, matrix2 does not look anything like what I had intended. Instead, it repeats the values in the first column (of the matrix2) eight times. What part of the code do I need to fix? [[alternative HTML version deleted]]
2004 Feb 22
3
Simulation help
I am a new R user. As a test, I want to write a simple code that does the following simulation: 1. Randomly generate a number from a distribution, say, Poisson. Let's say that number is 3. 2. Randomly generate 3 numbers from another distribution, say, Normal. 3. Compute the sum of the numbers generated in step 2 and read it into a vector, V. 4. Repeat steps 1 through 3 for 100,000 times. 5.