dist.Multivariate.Polya {LaplacesDemon}  R Documentation 
Multivariate Polya Distribution
Description
These functions provide the density and random number generation for the multivariate Polya distribution.
Usage
dmvpolya(x, alpha, log=FALSE)
rmvpolya(n, alpha)
Arguments
x 
This is data or parameters in the form of a vector of length

n 
This is the number of random draws to take from the distribution. 
alpha 
This is shape vector 
log 
Logical. If 
Details
Application: Discrete Multivariate
Density:
p(\theta) = \frac{N!}{\prod_k N_k!} \frac{(\sum_k \alpha_k  1)!}{(\sum_k \theta_k + \sum_k \alpha_k  1)!} \frac{\prod (\theta + \alpha  1)!}{(\alpha  1)!}
Inventor: George Polya (18871985)
Notation 1:
\theta \sim \mathcal{MPO}(\alpha)
Notation 3:
p(\theta) = \mathcal{MPO}(\theta  \alpha)
Parameter 1: shape parameter vector
\alpha
Mean:
E(\theta) =
Variance:
var(\theta) =
Mode:
mode(\theta) =
The multivariate Polya distribution is named after George Polya
(18871985). It is also called the Dirichlet compound multinomial
distribution or the Dirichletmultinomial distribution. The multivariate
Polya distribution is a compound probability distribution, where a
probability vector p
is drawn from a Dirichlet distribution with
parameter vector \alpha
, and a set of N
discrete
samples is drawn from the categorical distribution with probability
vector p
and having K
discrete categories. The compounding
corresponds to a Polya urn scheme. In document classification, for
example, the distribution is used to represent probabilities over word
counts for different document types. The multivariate Polya distribution
is a multivariate extension of the univariate Betabinomial distribution.
Value
dmvpolya
gives the density and rmvpolya
generates random
deviates.
Author(s)
Statisticat, LLC software@bayesianinference.com
See Also
dcat
,
ddirichlet
, and
dmultinom
.
Examples
library(LaplacesDemon)
dmvpolya(x=1:3, alpha=1:3, log=TRUE)
x < rmvpolya(1000, c(0.1,0.3,0.6))