pg.dist {MixedPoisson} | R Documentation |
Poisson-Gamma Distribution (Negative-Binomial)
Description
The function fits a mixed Poisson distribution, in which the random parameter follows Gamma distribution (the negative-binomial distribution). As teh method of estimation Expectation-maximization algorithm is used. In M-step the analytical formulas taken from [Karlis, 2005] are applied.
Usage
pg.dist(variable, alpha.start, beta.start, epsylon)
Arguments
variable |
The count variable. |
alpha.start |
The starting value of the parameter alpha. Default to 1. |
beta.start |
The starting value of the parameter beta. Default to 0.3 |
epsylon |
Default to epsylon = 10^(-8) |
Details
This function provides estimated parameters of the model
N|\lambda \sim Poisson(\lambda)
where \lambda
parameter is also a random
variable follows Gamma distribution with hiperparameters \alpha, \beta
. The
pdf of Gamma is of the form
f_\lambda(\lambda)=\frac{\lambda^{\alpha-1}\exp(-\beta\lambda)\beta^\lambda}{\Gamma(\alpha)}
.
Value
alpha |
the parameter of mixing Gamma distribution |
beta |
the parameter of mixing Gamma distribution |
theta |
the value 1/beta |
n.iter |
the number of steps in EM algorithm |
References
Karlis, D. (2005). EM algorithm for mixed Poisson and other discrete distributions. Astin bulletin, 35(01), 3-24.
Examples
library(MASS)
pGamma1 = pg.dist(variable=quine$Days)
print(pGamma1)