statable Statistics for study and research

Count regression (Poisson and negative binomial)

In brief

A count (whole numbers from 0, for example days absent, number of doctor visits) is predicted from other columns. Statable calculates a Poisson regression and checks whether the values vary more than this model allows (overdispersion); it then calculates negative binomial and says so first in the result. It is chosen under "More options" → "Model" in the question "Can something be predicted?"; for target values that look like counts, Statable suggests it.

What for

Counts are never negative, often right-skewed and have many zeros. A linear regression can give negative predictions. Count regression predicts the expected number and shows for each predictor by which factor it changes (IRR, rate ratio).

Requirements

Reading the result

Example (Venables & Ripley 2002, data MASS::quine, 146 school children): days absent from ethnic background, sex, age group and learner type. The values vary more than Poisson allows (Pearson χ²/df = 13.2; LR test χ² = 1,192.0, p < .001); Statable therefore calculates negative binomial (θ = 1.27). With Poisson the p values would be far too small. For background N the expected number of days absent is lower by a factor of 0.57 than for A (IRR = 0.57, 95% CI [0.42, 0.76], p < .001), i.e. by about 43%.

Reporting the result

negative binomial regression, θ = 1.27; χ²(6) = 25.12, p < .001; Eth (N): IRR = 0.57, 95% CI [0.42, 0.76], p < .001

In the text, name the chosen model and the reason (overdispersion). Do not word it causally.

Limits

Source

Cameron, A. C., & Trivedi, P. K. (2013). Regression Analysis of Count Data (2nd ed.). Cambridge University Press. Hilbe, J. M. (2011). Negative Binomial Regression (2nd ed.). Cambridge University Press. Self, S. G., & Liang, K.-Y. (1987). Asymptotic properties of maximum likelihood estimators and likelihood ratio tests under nonstandard conditions. Journal of the American Statistical Association, 82, 605-610. Venables, W. N., & Ripley, B. D. (2002). Modern Applied Statistics with S (4th ed.), sec. 7.4. Springer.

Related

Open in Statable