Learn R Programming

extraDistr (version 1.8.1)

DirMnom: Dirichlet-multinomial (multivariate Polya) distribution

Description

Density function, cumulative distribution function and random generation for the Dirichlet-multinomial (multivariate Polya) distribution.

Usage

ddirmnom(x, size, alpha, log = FALSE)
rdirmnom(n, size, alpha)

Arguments

x
$k$-column matrix of quantiles.
size
numeric vector; number of trials (zero or more).
alpha
$k$-values vector or $k$-column matrix; concentration parameter. Must be positive.
log
logical; if TRUE, probabilities p are given as log(p).
n
number of observations. If length(n) > 1, the length is taken to be the number required.

Details

If $(p[1],\dots,p[k]) ~ Dirichlet(\alpha[1],\dots,\alpha[k])$ and $(x[1],\dots,x[k]) ~ Multinomial(n, p[1],\dots,p[k])$, then $(x[1],\dots,x[k]) ~ DirichletMultinomial(n, \alpha[1],\dots,\alpha[k])$.

Probability density function $$ f(x) = \frac{\left(n!\right)\Gamma\left(\sum \alpha_k\right)}{\Gamma\left(n+\sum \alpha_k\right)}\prod_{k=1}^K\frac{\Gamma(x_{k}+\alpha_{k})}{\left(x_{k}!\right)\Gamma(\alpha_{k})} $$

References

Gentle, J.E. (2006). Random number generation and Monte Carlo methods. Springer.

Kvam, P. and Day, D. (2001) The multivariate Polya distribution in combat modeling. Naval Research Logistics, 48, 1-17.

See Also

Dirichlet, Multinomial