Regression analysis |
---|
|
Models |
---|
|
|
- Multilevel model
- Fixed effects
- Random effects
- Mixed model
|
- Nonlinear regression
- Nonparametric
- Semiparametric
- Robust
- Quantile
- Isotonic
- Principal components
- Least angle
- Local
- Segmented
|
|
Estimation |
---|
|
|
Background |
---|
- Regression model validation
- Mean and predicted response
- Errors and residuals
- Goodness of fit
- Studentized residual
- Gauss–Markov theorem
|
|
|
In statistics, Poisson regression is a 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.
Poisson regression models are generalized linear models with the logarithm as the (canonical) link function, and the Poisson distribution function.
Regression models
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 some constant, usually 1. Here θ is simply a concatenated to b.
Thus, when given a Poisson regression model θ and an input vector , the predicted mean of the associated Poisson distribution is given by
If Yi are independent observations with corresponding values xi of the predictor variable, 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 convex, making Newton–Raphson or other gradient-based methods appropriate estimation techniques.
Maximum likelihood-based parameter estimation
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 yi! and simply write
- .
To find a maximum, we need to solve an equation which has no closed-form solution. However, the negative log-likelhood, , 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 in practice
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]:pp.740-752 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.
"Exposure" and offset
Poisson regression may also be appropriate for rate data, where the rate is a count of events occurring to a particular unit of observation, divided by some measure of that unit's exposure. For example, biologists may count the number of tree species in a forest, and the rate would be the number of species per square kilometre. 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.fit <- glm(y ~ offset(log(exposure)) + x, family=poisson(link=log) )
Overdispersion
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 a negative binomial distribution instead.[2][3]
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.
Use in survival analysis
Poisson regression creates proportional hazards models, one class of survival analysis: see proportional hazards models for descriptions of Cox models.
Tests of over-dispersion
One method for testing for over dispersion in the data is to regress a variable zi against the predicted values of t estimated from the Poisson regression.[4] This test has three steps.
1. Estimate a Poisson regression of yi on xi and generate the predicted values ( ti )
2. Calculate the zi variable
3. Regress zi against ti with ordinary least squares. In symbols
where a is a constant and ei is a random variable with an expectation of zero.
The null hypothesis being tested here is that the data are Poisson-distributed: in this case a = 0.
Extensions
Regularized Poisson regression
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.
Implementations
Some statistics packages include implementations of Poisson regression.
- MATLAB Statistics Toolbox: Poisson regression can be performed using the "glmfit" and "glmval" functions.[5]
- Microsoft Excel: Excel is not capable of doing Poisson regression by default. One of the Excel Add-ins for Poisson regression is XPost
- R: The function for fitting a generalized linear model in R is glm(), and can be used for Poisson Regression
- SAS: Poisson regression in SAS is done by using GENMOD
- SPSS: In SPSS, Poisson regression is done by using the GENLIN command
- Stata: Stata has a procedure for Poisson regression named "poisson"
- mPlus: mPlus allows for Poisson regression using the command COUNT IS when specifying the data
See also
- Zero-inflated model
- Poisson distribution
References
- Cameron, A.C. and P.K. Trivedi (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. pp. xvi+483. ISBN 0-387-98247-7. MR 1633357.
- Hilbe, J. M. (2007). Negative Binomial Regression, Cambridge University Press. ISBN 978-0-521-85772-7
|
---|
| |
---|
| Continuous data | Location | - Mean (Arithmetic, Geometric, Harmonic)
- Median
- Mode
|
---|
| Dispersion | - Range
- Standard deviation
- Coefficient of variation
- Percentile
- Interquartile range
|
---|
| Shape | - Variance
- Skewness
- Kurtosis
- Moments
- L-moments
|
---|
|
---|
| Count data | |
---|
| Summary tables | - Grouped data
- Frequency distribution
- Contingency table
|
---|
| Dependence | - Pearson product-moment correlation
- Rank correlation (Spearman's rho, Kendall's tau)
- Partial correlation
- Scatter plot
|
---|
| Statistical graphics | |
---|
|
| | Data collection |
---|
| Designing studies | - Effect size
- Standard error
- Statistical power
- Sample size determination
|
---|
| Survey methodology | - Sampling
- Stratified sampling
- Opinion poll
- Questionnaire
|
---|
| Controlled experiment | - Design of experiments
- Randomized experiment
- Random assignment
- Replication
- Blocking
- Factorial experiment
- Optimal design
|
---|
| Uncontrolled studies | - Natural experiment
- Quasi-experiment
- Observational study
|
---|
|
| | Statistical inference |
---|
| Statistical theory | - Sampling distribution
- Sufficient statistic
- Meta-analysis
|
---|
| Bayesian inference | - Bayesian probability
- Prior
- Posterior
- Credible interval
- Bayes factor
- Bayesian estimator
- Maximum posterior estimator
|
---|
| Frequentist inference | |
---|
| Specific tests | - Z-test (normal)
- Student's t-test
- F-test
- Chi-squared test
- Wald test
- Mann–Whitney U
- Shapiro–Wilk
- Signed-rank
- Kolmogorov–Smirnov test
|
---|
| General estimation | - Bias
- Robustness
- Efficiency
- Maximum likelihood
- Method of moments
- Minimum distance
- Density estimation
|
---|
|
| | | | |
---|
| Categorical data | - Cohen's kappa
- Contingency table
- Graphical model
- Log-linear model
- McNemar's test
|
---|
| Multivariate statistics | |
---|
| Time series analysis | General | - Decomposition
- Trend
- Stationarity
- Seasonal adjustment
|
---|
| Time domain | |
---|
| Frequency domain | - Spectral density estimation
|
---|
|
---|
| Survival analysis | |
---|
|
| | Applications |
---|
| Biostatistics | |
---|
| Engineering statistics | - Chemometrics
- Methods engineering
- Probabilistic design
- Process & Quality control
- Reliability
- System identification
|
---|
| Social statistics | - Actuarial science
- Census
- Crime statistics
- Demography
- Econometrics
- National accounts
- Official statistics
- Population
- Psychometrics
|
---|
| Spatial statistics | |
---|
|
| | |
|
|
---|
| Computational statistics | |
---|
| Correlation and dependence | - Pearson product-moment correlation
- Rank correlation (Spearman's rho
- Kendall's tau)
- Partial correlation
- Confounding variable
|
---|
| Regression analysis | |
---|
| Regression as a statistical model | | |
---|
| Predictor structure | - Polynomial regression
- Growth curve
- Segmented regression
- Local regression
|
---|
| Non-standard | - Nonlinear regression
- Nonparametric
- Semiparametric
- Robust
- Quantile
- Isotonic
|
---|
| Non-normal errors | |
---|
|
---|
| Decomposition of variance | |
---|
| Model exploration | |
---|
| Background | - Mean and predicted response
- Gauss–Markov theorem
- Errors and residuals
- Goodness of fit
- Studentized residual
- Minimum mean-square error
|
---|
| Design of experiments | - Response surface methodology
- Optimal design
- Bayesian design
|
---|
| Numerical approximation | |
---|
| Applications | - Curve fitting
- Calibration curve
- Numerical smoothing and differentiation
- System identification
- Moving least squares
|
---|
| |
|