rmultinomial {multinomRob} | R Documentation |
Generates a random count vector for one observation of a multinomial
distribution for n
trials with probability vector pr
.
rmultinomial(n = 5, pr = c(0.5, 0.5), long = FALSE)
n |
Number of trials. |
pr |
Probability vector. |
long |
TRUE to choose one generator, FALSE to choose another one. |
Generates a random count vector for one observation of a multinomial
distribution for n
trials with probability vector pr
.
x |
Vector of counts. |
This function is only used in the examples and not in the
multinomRob
code.
Walter R. Mebane, Jr., Cornell University,
wrm1@cornell.edu, http://macht.arts.cornell.edu/wrm1/
Jasjeet S. Sekhon, UC Berkeley, sekhon@berkeley.edu, http://sekhon.berkeley.edu/
rmultinomial(10, c(.3, .3, .4));