Description Usage Arguments Value Author(s) Examples
rmultinomial: Generate random samples from multinomial distributions, where both n and p may vary among distributions
rmultz2: fixed p case
1 2 |
n |
vector of sizes |
p |
vector or probs |
rows |
numeric giving desired number rows to be output |
draws |
number samples required |
a matrix of rows
rows delivering specified samples
John Wallace, 17 Feb 1997 S-news , mods by Chasalow
1 2 3 | n <- c(100,20,10)
p <- matrix(c(.3,.1,.5,.1,.1,.2,.6,.8,.3),3)
rmultinomial(n,p)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.