Negative Binomial Regression calculator
Model count data with overdispersion. Fit negative binomial models online and calculate dispersion parameters.
What it does
Models the rate of a count outcome like Poisson, but allows the variance to exceed the mean (overdispersion).
When to use it
Your outcome is a count and it's overdispersed — variance bigger than the mean, which is the usual case for real count data.
Worked example
The same shape of question as Poisson — say, asthma attacks per patient per year, predicted by treatment, smoking status and age — but where the counts are far more spread out than Poisson expects: most patients have none and a few have many. Fitting Poisson to that produces confidence intervals that are too narrow, which is the whole reason this model exists.
Alternatives
- Poisson — the counts are not overdispersed (dispersion ≈ 1)
- a zero-inflated / hurdle NB — there are excess zeros beyond what NB fits
- a mixed count model (GLMM) — the counts are clustered or repeated
How to read the output
- Coefficient (Estimate) — log-rate scale
- On the log scale; exp(b) is the incidence rate ratio (IRR). The app shows the raw log-rate coefficient, not the IRR. Exponentiate before interpreting a per-unit rate change.
- Alpha (dispersion)
- The extra-variance parameter NB estimates; a larger alpha means more overdispersion than Poisson would allow. Report alpha — it's the reason NB was used instead of Poisson.
- z-statistic / 95% CI
- Wald z and IRR-scale intervals, as for Poisson. If Poisson looked 'significant' but NB doesn't, the NB result stands — the extra variance was real.
How this calculator is validated · Which statistical test should I use?