Bayesian Poisson Regression

Statistics
Introduced by
Gelman et al. (BDA); classical Poisson GLM from McCullagh & Nelder (1989)
Year
1989 (GLM foundation); Bayesian treatment formalized in 1990s–2000s
Type
Bayesian generalized linear model for count data
Family
Regression / GLM

What does it do?

Bayesian Poisson regression models non-negative integer counts with a Poisson likelihood and a log link, and places prior distributions on the regression coefficients.

Inference yields a posterior distribution for each coefficient rather than a single point estimate, so uncertainty is expressed as probability statements about parameters and predictions. It is the Bayesian counterpart of the classical Poisson generalised linear model.

The intuition behind the method

Poisson regression models event counts over a fixed exposure window, with the expected count driven by predictors through an exponential (log) link. The Bayesian version adds a prior layer: before seeing the data, you state a belief about the plausible size of each predictor's effect, and the data then update that belief. The output is a posterior distribution for every coefficient, which can be summarised by a posterior mean or median and a 95% credible interval. Priors matter most when counts are sparse or the sample is small, and they make existing knowledge an explicit part of the analysis.

History

Poisson regression as a generalised linear model is treated in McCullagh and Nelder's 1989 text on generalised linear models (2nd edition), which is the foundation for the likelihood and log link used here. Gelman et al.'s Bayesian Data Analysis (3rd edition, 2013), cited on this page, is a general reference for the Bayesian modelling framework applied here. Posterior computation for models of this kind is now commonly carried out with modern MCMC software such as Stan, which implements the NUTS sampler.

When to use it

Choose Bayesian Poisson regression when the outcome is a non-negative integer count (events per period, cases per region, occurrences per subject) and you want full posterior uncertainty for the coefficients. It is useful when the sample is small or sparse, when prior information from earlier studies or theory should enter the analysis, or when you plan to compare models with WAIC or LOO-CV. Do not use it as the default when counts are overdispersed, meaning the variance clearly exceeds the mean: the equidispersion assumption then understates uncertainty and posterior predictive checks fail, and a Bayesian negative binomial model is the usual alternative. It is also unsuitable for continuous outcomes, and for very large datasets where MCMC cost is prohibitive and a simpler GLM is adequate.

Limitations and considerations

  • MCMC sampling is slower than maximum-likelihood fitting and can become costly for large datasets or hierarchical structures.
  • In small samples the prior can dominate the likelihood, so the prior specification can drive the conclusions and must be reported.
  • The model inherits the Poisson equidispersion assumption, under which the mean and variance are equal. When this fails, posterior intervals are too narrow even though the Bayesian machinery is applied correctly.
  • Convergence diagnostics such as R-hat and effective sample size require more judgement to interpret than a standard GLM output.
  • Misspecification of the likelihood, including an excess of zeros, biases inference in ways that the choice of prior does not correct.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Each coefficient receives a full posterior distribution, so statements such as the probability that a rate ratio exceeds one can be read directly from the posterior draws.
  • Priors regularise the coefficients, which stabilises estimates when counts are sparse or when there are many predictors relative to observations.
  • Prior information from earlier studies can be encoded explicitly through informative priors on the coefficients.
  • Rate ratios exp(beta) are read as multiplicative effects on the expected count, the same interpretation as in the frequentist Poisson GLM.
  • WAIC and LOO-CV compare models using the full posterior rather than a single fitted value per model.
  • Posterior predictive checks compare simulated counts with the observed counts, which makes a variance-to-mean mismatch visible.

Applications

  • Epidemiology: modelling disease incidence counts across regions, with an offset for population at risk and priors informed by earlier surveillance data.
  • Ecology: modelling species abundance counts per survey unit, with an offset that absorbs differences in sampling effort.
  • Public health: modelling injury or mortality counts per population stratum, where small strata make the prior especially influential.
  • Clinical trials: modelling adverse-event counts across treatment arms when patient numbers are small.
  • Individual-level event counts over an observation period, such as hospital visits, with an exposure offset for follow-up time.

How it works

How it works

1

Each observed count y_i is treated as a draw from a Poisson distribution with rate lambda_i. For a given coefficient vector, the likelihood is the probability of the observed counts under the implied rates, so coefficient values that make the observed counts improbable receive low likelihood.

Formula
y_i \mid \lambda_i \sim \text{Poisson}(\lambda_i)
2

The log link ties the linear predictor x_i^T beta to the rate, so lambda_i = exp(x_i^T beta) is always positive. Exponentiating a coefficient gives the multiplicative change in the expected count for a one-unit increase in that predictor, holding the other predictors fixed.

Formula
\log(\lambda_i) = x_i^{\top} \beta
3

The prior over beta encodes beliefs held before the data are seen. A weakly-informative Normal(0, 2.5) prior on standardised predictors, the example used on this page, keeps coefficients in a plausible range while letting the likelihood dominate when the data are informative. An informative prior can instead encode results from earlier studies, in which case its source and strength should be reported.

Formula
\beta \sim p(\beta) \text{ (e.g., Normal or weakly-informative)}
4

The posterior p(beta | y) is proportional to the Poisson likelihood multiplied by the prior. It has no closed form for this model, so it is usually approximated by Markov chain Monte Carlo (MCMC), for example with the NUTS sampler in Stan, or by variational inference.

Formula
p(\beta \mid y) \propto p(y \mid \beta)\, p(\beta)
5

From the posterior draws one obtains posterior means or medians and 95% credible intervals for each coefficient. Rate ratios are obtained by exponentiating each draw of beta, so the credible interval for exp(beta) gives the range of plausible multiplicative effects on the expected count. Posterior predictive checks simulate replicated counts from the posterior and compare their variance-to-mean ratio with that of the observed counts; a systematic gap indicates overdispersion or another misfit. Models can be compared by WAIC or LOO-CV. Convergence diagnostics such as R-hat, which should be close to 1.0, and effective sample size should be checked before the summaries are interpreted.

Common pitfalls

  • Ignoring overdispersion: check the posterior predictive distribution for a variance-to-mean discrepancy. If simulated variance is clearly below the observed variance, consider a Bayesian negative binomial model.
  • Using flat or improper priors without checking: with sparse data they can yield improper posteriors or slow MCMC mixing. Weakly-informative priors are a safer default.
  • Omitting an offset when exposure differs across units, such as different population sizes or observation times; the rate is then confounded with exposure.
  • Interpreting MCMC output before checking convergence: R-hat should be close to 1.0 and effective sample sizes should be adequate.
  • Reading rate ratios from a small sample whose posterior is still dominated by the prior; plot the prior and posterior together.

Frequently asked questions

What prior should I use for the regression coefficients?

A commonly used weakly-informative choice is Normal(0, 2.5) on standardised predictors. It keeps coefficients in a plausible range without overwhelming the likelihood. Check that the implied rate ratios exp(beta) are plausible for your domain, and run a prior sensitivity check.

How do I tell if my data are overdispersed?

After fitting the model, run a posterior predictive check: simulate replicated datasets from the posterior and compare the variance-to-mean ratio of the simulated counts with that of the observed data. If simulated variance is systematically lower than observed variance, the Poisson assumption is too restrictive and a Bayesian negative binomial regression is a better choice.

When should I add an offset term?

Add an offset when the exposure or population at risk differs across observations. For example, if one region has ten times the population of another, the raw counts are not comparable without adjusting for population size. The offset log(exposure_i) is added to the linear predictor with its coefficient fixed at 1.

How does Bayesian Poisson regression compare to frequentist Poisson GLM?

Both share the same likelihood and log link. The Bayesian version adds priors and returns full posterior distributions rather than point estimates and asymptotic confidence intervals. A Bayesian 95% credible interval is a probability statement about the parameter, given the prior and the data. A frequentist 95% confidence interval is a procedure that, over repeated samples, covers the true value in 95% of cases. In large samples the two agree closely; differences are most pronounced in small samples or with informative priors.

Can I use this model for zero-inflated counts?

Standard Bayesian Poisson regression does not separately model an excess of zeros. If your data have more zeros than a Poisson distribution predicts, use a Bayesian zero-inflated Poisson or hurdle model instead, which explicitly accounts for a structural zero-generating process.

Related methods

Sources

  1. Gelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A., & Rubin, D. B. (2013). Bayesian Data Analysis (3rd ed.). CRC Press.

    ISBN: 978-1439840955
  2. McCullagh, P., & Nelder, J. A. (1989). Generalized Linear Models (2nd ed.). Chapman and Hall.

    ISBN: 978-0412317606