Poisson Regression

It has been suggested that Fixed-effect Poisson model be merged into this article. (Discuss) Proposed since October 2017. |

In statistics, **Poisson regression** is a generalized linear model form of regression analysis used to model count data and contingency tables. Poisson regression assumes the response variable *Y* has a Poisson distribution, and assumes the logarithm of its expected value can be modeled by a linear combination of unknown parameters. A Poisson regression model is sometimes known as a log-linear model, especially when used to model contingency tables.

**Negative binomial regression** is a popular generalization of Poisson regression because it loosens the highly restrictive assumption that the variance is equal to the mean made by the Poisson model. The traditional negative binomial regression model, commonly known as NB2, is based on the Poisson-gamma mixture distribution. This model is popular because it models the Poisson heterogeneity with a gamma distribution.

Poisson regression models are generalized linear models with the logarithm as the (canonical) link function, and the Poisson distribution function as the assumed probability distribution of the response.

If is a vector of independent variables, then the model takes the form

where and . Sometimes this is written more compactly as

where **x** is now an (*n* + 1)-dimensional vector consisting of *n* independent variables concatenated to a vector of ones. Here * ?* is simply

Thus, when given a Poisson regression model * ?* and an input vector

If *Y*_{i} are independent observations with corresponding values **x**_{i} of the predictor variables, then * ?* can be estimated by maximum likelihood. The maximum-likelihood estimates lack a closed-form expression and must be found by numerical methods. The probability surface for maximum-likelihood Poisson regression is always concave, making Newton-Raphson or other gradient-based methods appropriate estimation techniques.

Given a set of parameters *?* and an input vector *x*, the mean of the predicted Poisson distribution, as stated above, is given by

and thus, the Poisson distribution's probability mass function is given by

Now suppose we are given a data set consisting of *m* vectors , along with a set of *m* values . Then, for a given set of parameters *?*, the probability of attaining this particular set of data is given by

By the method of maximum likelihood, we wish to find the set of parameters *?* that makes this probability as large as possible. To do this, the equation is first rewritten as a likelihood function in terms of *?*:

Note that the expression on the right hand side has not actually changed. A formula in this form is typically difficult to work with; instead, one uses the *log-likelihood*:

Notice that the parameters *?* only appear in the first two terms of each term in the summation. Therefore, given that we are only interested in finding the best value for *?* we may drop the *y*_{i}! and simply write

To find a maximum, we need to solve an equation which has no closed-form solution. However, the negative log-likelihood, , is a convex function, and so standard convex optimization techniques such as gradient descent can be applied to find the optimal value of *?*.

Poisson regression may be appropriate when the dependent variable is a count, for instance of events such as the arrival of a telephone call at a call centre.^{[1]} The events must be independent in the sense that the arrival of one call will not make another more or less likely, but the probability per unit time of events is understood to be related to covariates such as time of day.

Poisson regression may also be appropriate for rate data, where the rate is a count of events divided by some measure of that unit's *exposure* (a particular unit of observation). For example, biologists may count the number of tree species in a forest: events would be tree observations, exposure would be unit area, and rate would be the number of species per unit area. Demographers may model death rates in geographic areas as the count of deaths divided by person-years. More generally, event rates can be calculated as events per unit time, which allows the observation window to vary for each unit. In these examples, exposure is respectively unit area, person-years and unit time. In Poisson regression this is handled as an **offset**, where the exposure variable enters on the right-hand side of the equation, but with a parameter estimate (for log(exposure)) constrained to 1.

which implies

Offset in the case of a GLM in R can be achieved using the offset function:

```
glm(y ~ offset(log(exposure)) + x, family=poisson(link=log) )
```

A characteristic of the Poisson distribution is that its mean is equal to its variance. In certain circumstances, it will be found that the observed variance is greater than the mean; this is known as overdispersion and indicates that the model is not appropriate. A common reason is the omission of relevant explanatory variables, or dependent observations. Under some circumstances, the problem of overdispersion can be solved by using quasi-likelihood estimation or a negative binomial distribution instead.^{[2]}^{[3]}

Ver Hoef and Boveng described the difference between quasi-Poisson (also called overdispersion with quasi-likelihood) and negative binomial (equivalent to gamma-Poisson) as follows: If *E*(*Y*) = *?*, the quasi-Poisson model assumes var(*Y*) = while the gamma-Poisson assumes var(*Y*) = *?*(1 + ), where *?* is the quasi-Poisson overdispersion parameter, and *?* is the shape parameter of the negative binomial distribution. For both models, parameters are estimated using Iteratively reweighted least squares. For quasi-Poisson, the weights are *?*/*?*. For negative binomial, the weights are *?*/(1 + ). With large *?* and substantial extra-Poisson variation, the negative binomial weights are capped at 1/*?*. Ver Hoef and Boveng discussed an example where they selected between the two by plotting mean squared residuals vs. the mean.^{[4]}

Another common problem with Poisson regression is excess zeros: if there are two processes at work, one determining whether there are zero events or any events, and a Poisson process determining how many events there are, there will be more zeros than a Poisson regression would predict. An example would be the distribution of cigarettes smoked in an hour by members of a group where some individuals are non-smokers.

Other generalized linear models such as the negative binomial model or zero-inflated model may function better in these cases.

Poisson regression creates proportional hazards models, one class of survival analysis: see proportional hazards models for descriptions of Cox models.

When estimating the parameters for Poisson regression, one typically tries to find values for *?* that maximize the likelihood of an expression of the form

where *m* is the number of examples in the data set, and is the probability mass function of the Poisson distribution with the mean set to . Regularization can be added to this optimization problem by instead maximizing

for some positive constant . This technique, similar to ridge regression, can reduce overfitting.

On a different vein, several researchers have recently considered much more potent, *nonlinear alternatives*, for modeling the mapping of independent to dependent variables; Gaussian processes ^{[5]} and deep latent variable networks ^{[6]} are characteristic such examples.

**^**Greene, William H. (2003).*Econometric Analysis*(Fifth ed.). Prentice-Hall. pp. 740-752. ISBN 0130661899.**^**Paternoster R, Brame R (1997). "Multiple routes to delinquency? A test of developmental and general theories of crime".*Criminology*.**35**: 45-84. doi:10.1111/j.1745-9125.1997.tb00870.x.**^**Berk R, MacDonald J (2008). "Overdispersion and Poisson regression".*Journal of Quantitative Criminology*.**24**(3): 269-284. doi:10.1007/s10940-008-9048-4.**^**Ver Hoef, JAY M.; Boveng, Peter L. (2007-01-01). "Quasi-Poisson vs. Negative Binomial Regression: How should we model overdispersed count data?".*Ecology*.**88**(11): 2766-2772. doi:10.1890/07-0043.1. Retrieved .**^**Torrado, N., Wiper, M.P., Lillo, R.E., 2013. Software reliability modeling with software metrics data via Gaussian processes. IEEE Trans. Softw. Eng. 39 (8), 1179-1186.**^**Andreas S. Andreou and Sotirios P. Chatzis, "Software Defect Prediction Using Doubly Stochastic Poisson Processes Driven by Stochastic Belief Networks," Journal of Systems and Software, vol. 122, pp. 72-82, Dec. 2016. [1]

- Cameron, A. C.; Trivedi, P. K. (1998).
*Regression analysis of count data*. Cambridge University Press. ISBN 0-521-63201-3. - Christensen, Ronald (1997).
*Log-linear models and logistic regression*. Springer Texts in Statistics (Second ed.). New York: Springer-Verlag. ISBN 0-387-98247-7. MR 1633357. - Gouriéroux, Christian (2000). "The Econometrics of Discrete Positive Variables: the Poisson Model".
*Econometrics of Qualitative Dependent Variables*. New York: Cambridge University Press. pp. 270-83. ISBN 0-521-58985-1. - Greene, William H. (2008). "Models for Event Counts and Duration".
*Econometric Analysis*(8th ed.). Upper Saddle River: Prentice Hall. pp. 906-944. ISBN 978-0-13-600383-0. - Hilbe, J. M. (2007).
*Negative Binomial Regression*. Cambridge University Press. ISBN 978-0-521-85772-7. - Jones, Andrew M.; et al. (2013). "Models for count data".
*Applied Health Economics*. London: Routledge. pp. 295-341. ISBN 978-0-415-67682-3.

This article uses material from the Wikipedia page available here. It is released under the Creative Commons Attribution-Share-Alike License 3.0.

What We've Done

Led Digital Marketing Efforts of Top 500 e-Retailers.

Worked with Top Brands at Leading Agencies.

Successfully Managed Over $50 million in Digital Ad Spend.

Developed Strategies and Processes that Enabled Brands to Grow During an Economic Downturn.

Taught Advanced Internet Marketing Strategies at the graduate level.

Manage research, learning and skills at defaultlogic.com. Create an account using LinkedIn to manage and organize your omni-channel knowledge. defaultlogic.com is like a shopping cart for information -- helping you to save, discuss and share.