Poisson regression models outcomes that are counts, such as the number of clinic visits or incidents. This guide explains the Poisson distribution, incidence rate ratios, the assumptions and the overdispersion check, and how to run a model in AnalyZ Solutions.
Poisson regression is a method for studying outcomes that are counts, meaning how many times something happened. It shows which factors are linked to the count, by how much, and how many events to expect for a particular person.
Many outcomes are counts: the number of clinic visits in a year, the number of days a child was ill, the number of incidents reported at a site. The thing you want to explain is the outcome, and the factors you use to explain it are the predictors. Counts are whole numbers that cannot be negative, and they are often bunched near zero with a long tail of larger values.
Suppose you record the number of clinic visits in a year for 600 people, together with whether each person smokes and their age. You want to know three things. Do smokers make more visits than non-smokers? Does age make a difference? And how many visits would you expect from a smoker aged 40? Poisson regression answers all three.
Linear regression fits a straight line to a numeric outcome. For counts it has problems. It can predict a negative number of visits, which is impossible. It assumes the spread of the data is the same everywhere, while counts spread out more as their average rises. And it ignores that counts are whole numbers. Poisson regression is built for counts, so its predictions stay above zero and it takes account of how counts spread.
Use Poisson regression for outcomes that are counts of events, where each unit could in principle have any non-negative whole number. It fits counts of visits, episodes, incidents, or items. It also works for rates when the exposure is the same for everyone, such as a fixed one-year window. To plan the sample for comparing two incidence rates, see sample size for a change in rate.
It is not appropriate when observation periods differ a lot between units, unless you account for exposure. Nor is it suitable when the count has a fixed upper limit, such as the number of correct answers out of ten, which calls for a binomial or logistic approach.
| Feature | Linear regression | Poisson regression | Negative binomial regression |
|---|---|---|---|
| Outcome | Numeric, roughly continuous | A count: 0, 1, 2, and so on | A count with extra variation |
| Distribution assumed | Normal errors | Poisson | Negative binomial |
| Variance | Constant, separate from the mean | Equal to the mean | The mean plus alpha times the mean squared |
| Predictions | Can fall below zero | Always above zero | Always above zero |
| How effects act | Add a fixed amount | Multiply by a fixed ratio | Multiply by a fixed ratio |
| Effect measure | Difference in the outcome | Incidence rate ratio | Incidence rate ratio |
| Typical problem | Skewed, discrete outcome | Overdispersion | Too many zeros |
Linear regression can still work for counts when the average is large, roughly above 10 or 20, because the distribution is then close to symmetric. For small counts with many zeros, Poisson regression is the better choice. If the variation is clearly larger than the average, use negative binomial regression.
Poisson regression rests on three ideas: the Poisson distribution, a way of letting its average change from person to person, and the difference between counts and rates.
The Poisson distribution describes the number of events in a fixed period or space when events happen one at a time, independently of each other, at a steady average rate. If a clinic sees an average of 2 visits per person in a year, the Poisson distribution gives the chance that a particular person makes 0, 1, 2, 3, or more visits.
It has a single number, the average, and that number controls everything. The variance equals the mean, so a group with an average of 2 visits also has a variance of 2. The shape changes with the average. When the average is low, most people have zero or one event and the distribution is lopsided. As the average rises, the distribution spreads out and becomes close to symmetric. Each panel below is scaled to its own tallest bar, so compare the shapes and the stated chance of none, and not the heights.
Poisson regression lets the average differ from person to person according to their characteristics. It does this on the log scale, writing the logarithm of the average count as a straight-line combination of the predictors. Taking the exponential converts it back, which keeps every predicted average above zero. A consequence is that effects are multiplicative: a predictor multiplies the expected count by a fixed factor instead of adding a fixed number to it. That factor is the incidence rate ratio.
A count is only comparable between people if they were observed for the same length of time. A person seen for twelve months will have more events than one seen for six, even if their underlying rate is the same. The quantity of real interest is then the rate, events per unit of exposure, such as visits per person-year. When everyone has the same exposure, the count and the rate carry the same information, and Poisson regression applies directly. AnalyZ Solutions does not include an exposure adjustment, so use it with a fixed observation window.
Poisson regression assumes the count Y follows a Poisson distribution with mean μ, and models the logarithm of the mean as a straight-line combination of the predictors.
Taking the exponential keeps the predicted mean positive. A one-unit increase in a predictor multiplies the mean by e^b, which is the incidence rate ratio, explained under Reading the output. The last line is the defining feature of the Poisson distribution, that the variance equals the mean. The coefficients are found by maximum likelihood.
Take a smoker aged 40, with age measured in decades, using the coefficients from the results below.
Poisson regression rests on a few assumptions. Breaking them does not stop the model from running, but it makes the standard errors and significance levels unreliable.
Poisson regression assumes the variance of the counts equals their mean. Real counts often vary much more than that, a situation called overdispersion. It occurs when some units have far higher counts than others for reasons the model does not capture. If ignored, standard errors are too small and results look more significant than they should.
AnalyZ Solutions checks for this automatically by comparing the observed variation with what Poisson expects. The ratio is built from the squared gaps between each observed count and its predicted mean, each divided by that mean. If the data really follow a Poisson distribution, these average about 1.
When the ratio is well above 1, specifically above 1.5, the module shows a warning recommending negative binomial regression. A ratio near 1 supports the Poisson assumption. In the example under Interpreting the result the ratio is 0.95, so the model is suitable. The figure compares the 600 observed counts with what a Poisson model with the same average expects, and the two agree closely. The negative binomial guide shows a case where they do not.
An incidence rate ratio, or IRR, compares expected counts between two situations. A ratio of 1 means no difference, above 1 means higher counts, and below 1 means lower counts. If the IRR for smokers compared with non-smokers is 1.3, smokers are expected to have 30% more events. If the IRR for each additional 10 years of age is 1.08, each extra decade goes with 8% higher expected counts.
Ratios multiply, which is why they are convenient. Two predictors with IRRs of 1.3 and 1.2 together suggest counts about 56% higher, since 1.3 times 1.2 is 1.56. Two small calculations help when describing results:
An IRR of 1.315 means 31.5% more events, and an IRR of 0.80 means 20% fewer. For a numeric predictor the ratio applies per unit. With an IRR of 1.10 per decade of age, twenty years of age go with 1.10 × 1.10 = 1.21, or 21% more events.
Because effects multiply, the same ratio produces a growing difference in absolute terms. The figure shows smokers and non-smokers by age in the example. The ratio is 1.31 at every age, but the gap in expected visits grows from 0.53 visits at age 30 to 0.75 at age 65, because the baseline count is higher at older ages. Reporting only the ratio, or only the difference, hides half of the picture, so give the baseline count as well.
Each predictor has an IRR with a 95% confidence interval and significance level. A toggle switches between IRRs and raw coefficients on the log scale. The raw coefficient b is the natural logarithm of the IRR, so IRR = e^b. In the example the coefficient for smoking is 0.274 and the IRR is e^0.274 = 1.315. For small coefficients, b is close to the proportional change, but the IRR is the exact figure.
The interval is calculated on the log scale and then converted back, so it is not centred on the IRR. For smoking, the interval of 1.171 to 1.477 sits around an IRR of 1.315, with more room above it than below. An interval that spans 1 corresponds to a predictor that is not significant at the 5% level.
The summary reports the number of cases, log-likelihood, a likelihood-ratio test of whether the predictors improve on a model with none, a pseudo R-squared, AIC, and the dispersion ratio. A significant likelihood-ratio test means the predictors help. Pseudo R-squared is usually low for counts, 0.02 in the example, because counts are noisy even when the model is right, so do not judge a Poisson model by it. AIC is useful for comparing with a negative binomial model fitted to the same data, where the lower value is better. The dispersion ratio is the check described in the previous section.
Open Inferential Analysis, choose Regression, then Poisson Regression.
The figures below are invented to show the steps, and they follow the results tables in AnalyZ Solutions, with a few columns left out to save space. Suppose the number of clinic visits in a year is modelled for 600 people using smoking status (reference: Non-smoker) and age in decades.
| N | Log-likelihood | LR chi2 | Prob > chi2 | Pseudo R² | AIC | Dispersion (Pearson chi2/N) |
|---|---|---|---|---|---|---|
| 600 | -1020.7073 | 38.64 | < 0.001 | 0.019 | 2047.41 | 0.948 |
| Variable | IRR | 95% CI lower | 95% CI upper | p-value | Sig |
|---|---|---|---|---|---|
| Smoker (ref: Non-smoker) | 1.315 | 1.171 | 1.477 | < 0.001 | *** |
| Age (per 10 years) | 1.103 | 1.053 | 1.154 | < 0.001 | *** |
Smokers made about 32% more clinic visits than non-smokers, and each extra decade of age was associated with about 10% more visits, both significant at the 0.1% level. The dispersion check showed that a Poisson model was suitable. The predictors explained little of the total variation in visits, so most of the difference between people remains unexplained.
Ignoring an overdispersion warning. Switch to negative binomial regression.
Reporting the ratio without the baseline count. A ratio of 1.3 means something different when the baseline is 0.2 visits than when it is 20. Give the expected counts alongside the ratio.
Using it for counts with different exposure. If some people were observed for six months and others for twelve, the counts are not comparable without adjustment.
Modelling a bounded count. Counts out of a fixed total are better handled by logistic regression.
Too many zeros. If many more units have zero than the model expects, for example because many people never use the service at all, neither Poisson nor negative binomial may fit well.
Open Regression in AnalyZ Solutions. Free to sign up, free to analyze.
Get started