rmultinomial

0th

Percentile

Random Number Generator for the Multinomial Distribution

Generates a random count vector for one observation of a multinomial distribution for n trials with probability vector pr.

Keywords
multivariate, distribution
Usage
rmultinomial(n = 5, pr = c(0.5, 0.5), long = FALSE)
Arguments
n
Number of trials.
pr
Probability vector.
long
TRUE to choose one generator, FALSE to choose another one.
Details

Generates a random count vector for one observation of a multinomial distribution for n trials with probability vector pr.

Value

x
Vector of counts.

Note

This function is only used in the examples and not in the multinomRob code.

Aliases
  • rmultinomial
Examples
 rmultinomial(10, c(.3, .3, .4));
Documentation reproduced from package multinomRob, version 1.8-6.1, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.