Generates a random vector from a multinomial sampling model.
rvmultinom(n=1, size=1, prob)
integer, number of random variables to generate
integer or integer-valued rv: the number of trials (size of each sample)
vector (of length at least 3) prior probabilities of successes of each trial (may be constant or an rv object)
The length of
prob determines the number of bins.
prob will be normalized to have sum 1.
length(prob) is two,
rvbinom is called instead.
NOTE. Case of random
prob — not yet
optimized for speed.
A random array of dimensions
Jouni Kerman firstname.lastname@example.org
Kerman, J. and Gelman, A. (2007). Manipulating and Summarizing Posterior Simulations Using Random Variable Objects. Statistics and Computing 17:3, 235-244.