rvmultinom {rv} | R Documentation |
Generates a random vector from a binomial sampling model.
rvmultinom(n=1, size=1, prob)
n |
integer, number of random variables to generate |
size |
integer or integer-valued rv: the number of trials (size of each sample) |
prob |
vector (of length at least 3) prior probabilities of successes of each trial (may be constant or an rv object) |
The vector prob
will be normalized to have sum 1.
If length(prob)
is two, rvbinom
is called instead.
A random vector of length length(prob)*n
.
Jouni Kerman kerman@stat.columbia.edu http://www.stat.columbia.edu/~kerman
Kerman, Jouni and Gelman, Andrew. Manipulating and Summarizing Posterior Simulations Using Random Variable Objects. Technical report, Columbia University, New York.
#