# Poisson-Gamma Regression

### Description

The function fits a mixed Poisson regression, in which the random parameter follows Gamma distribution. As the method of estimation Expectation-maximization algorithm is used. In M-step the GLM is applied.

### Usage

 1 pg.reg.glm(variable, regressors, lambda.start, gamma.par.start, epsylon, n) 

### Arguments

 variable The count dependent variable in the regression regressors The independent variables in the regression. Could be numerical as well as factors. lambda.start The starting value of lambda parameter of Poisson distribution. Default to 1. gamma.par.start The starting value of the parameter of Gamma distribution. Default to 1. epsylon Default to epsylon = 10^(-8) n The integer value for the Laguerre quadrature. Default to 100.

### Details

This function provides estimated parameters of the model N|θ \sim Poisson(λ_i θ) where θ is a latent variable comes from Gamma distribution with one parameter γ. The pdf of Gamma is of the form f_θ(θ)=\frac{γ^γ}{Γ(γ)}θ^{γ-1}\exp(-γθ) . The parameter λ_i is determined by regressors X_1,...,X_k through log-link λ_i=\mathbf{x}_i'\mathbf{\boldsymbol β}.

### Value

 lambda fitted values of parameter lambda gamma.par the parameter of mixing Gamma distribution regression.coefficients beta vector n.iter n likelihood.values values of log-likelihood

### References

Ghitany, M. E., Karlis, D., Al-Mutairi, D. K., & Al-Awadhi, F. A. (2012). An EM algorithm for multivariate mixed Poisson regression models and its application. Applied Mathematical Sciences, 6(137), 6843-6856.

### Examples

 1 2 3 4 5 library(MASS) index = which(quine$Days<11) reg = quine[index, -which(names(quine)=="Days")] poisGamma = pg.reg.glm(variable=quine$Days[index], regressors=reg) print(poisGamma) 

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.