Poisson regression

Poisson regression for count outcomes

Counts — events per site, admissions per day, cells per field — are not continuous and cannot go negative. Poisson regression models their rate on a log scale. Magic Stat fits it with the same iterative algorithm as R's glm and reports the incidence-rate ratios and the overdispersion check that decide whether the model holds.

The honest part

Counts need a log link, and an overdispersion check

Poisson regression models the log of the expected count as a linear function of the predictors: log(μ) = X·β. The coefficients live on the log scale, and their exponentials — incidence-rate ratios — say by what factor the rate changes per one-unit increase in a predictor. Magic Stat reports both the coefficients with their standard errors and the exponentiated ratios with confidence intervals.

The assumption that lifts the method is that the variance equals the mean. Real count data often show more variance than that — overdispersion — which inflates the standard errors and can make a predictor look significant when it is not. Magic Stat reports the ratio of deviance to residual degrees of freedom, so overdispersion is visible rather than assumed away.

Predictors can be numeric or categorical. Categorical predictors are split by category with the first category in alphabetical order as the reference, following R's treatment contrasts, and each other category gets its own term.

What it does

What Magic Stat gives you for Poisson regression

How it works

Counts in, rate ratios out

  1. Load the data. a count column (integers ≥ 0) and the predictors.
  2. Choose Poisson Regression. Statistics → Regression Models → Poisson Regression (Count Outcome).
  3. Select the count outcome and predictors. numeric and categorical predictors can be mixed.
  4. Read the fit and the dispersion. coefficients, rate ratios, deviance explained and the overdispersion ratio appear together.
  5. Export. the tables and the interpretation go into the report.
Options

The settings, in the dialog

Outcome: a count column — integer values, zero or positive, with at least one non-zero count.

Predictors: numeric columns enter as single terms; categorical columns are split by category against the first category in alphabetical order.

Link: log, the canonical link for the Poisson family.

Frequently asked

Poisson regression questions, answered honestly

Why not just use linear regression on counts?

A straight line will predict negative counts and assumes constant variance. Poisson regression keeps predictions non-negative through the log link and ties the variance to the mean, which is the correct behaviour for counts.

What is an incidence-rate ratio?

It is exp(β), the factor by which the expected count changes per one-unit increase in the predictor, holding the others fixed. A value of 1.5 means a 50% higher rate; a value below 1 means a lower rate.

What if the data are overdispersed?

Overdispersion means the variance exceeds the mean, so the standard errors are too small. Quasi-Poisson, which estimates a dispersion parameter, is available in Magic Stat's GLM dialog. For a negative binomial model — the usual alternative when overdispersion is severe — you would need R's MASS::glm.nb.

Do the counts have to be integers?

Yes. The outcome must be integer-valued and non-negative. Rates would be modelled differently, with an offset or a proportion-style outcome, not as a plain count.

Do I need R?

No. The fit replicates R's Poisson GLM. If your data call for negative binomial or zero-inflated models, R's ecosystem covers those.

Generalized linear models → Log-linear models → Logistic regression →