These functions provide the density and random number generation for the multivariate Polya distribution.
dmvpolya(x, alpha, log=FALSE)
rmvpolya(n, alpha)
This is data or parameters in the form of a vector of length
This is the number of random draws to take from the distribution.
This is shape vector
Logical. If log=TRUE
, then the logarithm of the
density is returned.
dmvpolya
gives the density and rmvpolya
generates random
deviates.
Application: Discrete Multivariate
Density:
Inventor: George Polya (1887-1985)
Notation 1:
Notation 3:
Parameter 1: shape parameter vector
Mean:
Variance:
Mode:
The multivariate Polya distribution is named after George Polya
(1887-1985). It is also called the Dirichlet compound multinomial
distribution or the Dirichlet-multinomial distribution. The multivariate
Polya distribution is a compound probability distribution, where a
probability vector
dcat
,
ddirichlet
, and
dmultinom
.
# NOT RUN {
library(LaplacesDemon)
dmvpolya(x=1:3, alpha=1:3, log=TRUE)
x <- rmvpolya(1000, c(0.1,0.3,0.6))
# }
Run the code above in your browser using DataLab