Poisson count/rate regression
Regression · Method and input reference
Rows: nonnegative integer count, positive exposure (use 1 for equal exposure), then numeric predictors. Log-link with log(exposure) offset. Independent observations required. Conditional mean equals variance; inspect overdispersion. No zero-inflated or clustered model. Synthetic example: 240 simulated counts with unequal observation exposure and two predictors.
Open calculator · Compare methods in the decision matrix
When to consider it
- Model independent counts or rates with a Poisson log-link and exposure offset.
Assumptions and scope
- Observations must be independent between subjects; repeated rows from one subject are not independent samples.
- Enter Count, positive Exposure, then predictors. Use exposure 1 for equal observation periods. Review dispersion, zero inflation and fit diagnostics.
Required inputs
- Count, exposure, predictors — Numeric observations; preserve the row and column structure described above.
Review missing values and data coding before running. Sample inputs are synthetic teaching examples.
Implementation
Rows: nonnegative integer count, positive exposure (use 1 for equal exposure), then numeric predictors. Log-link with log(exposure) offset. Independent observations required. Conditional mean equals variance; inspect overdispersion. No zero-inflated or clustered model. Synthetic example: 240 simulated counts with unequal observation exposure and two predictors.
- statsmodels 0.14.4: statsmodels.api.GLM
These are pinned library versions; saved results record the versions actually used at runtime.