Dirichlet-multinomial distribution
dirmult.RdDensity and and random generation for the Dirichlet-multinomial distribution.
Arguments
- x
vector or matrix of non-negative counts, where rows are observations and columns are categories.
- size
vector of total counts for each observation. Needs to match the row sums of
x.- alpha
vector or matrix of positive shape parameters
- log
logical; if
TRUE, densities \(p\) are returned as \(\log(p)\).- n
number of random values to return.