Course contentsShow
← Data Science
Lesson 692 of 2,14518. Generalized Linear ModelsFree lesson

Offset Terms for Exposure

Using offset variables to model rates when observations have different exposure times or denominators.

Offset Terms for Exposure

What You'll Learn

You'll learn how to use offset variables in Poisson regression to properly model rates when your observations have unequal exposure times or denominators.

The Problem with Unequal Exposure

When counting events (like accidents, sales, or disease cases), observations often have different exposure levels. For example:

  • Hospital A had 10 infections over 1,000 patient-days
  • Hospital B had 15 infections over 5,000 patient-days

Which hospital has a worse infection problem? Raw counts (15 > 10) mislead you. You need to account for the different denominators (exposure).

What is an Offset?

An offset is a predictor whose coefficient is fixed at 1.0. Instead of estimating it, you "lock it in." In Poisson regression, we model:

log(count) = β₀ + β₁X₁ + ... + log(exposure)

Rearranging:

log(count / exposure) = β₀ + β₁X₁ + ...

Now you're modeling the rate (count per unit exposure), not just the raw count.

Practical Examples

  • Person-time: Modeling disease incidence rates with different follow-up durations
  • Area: Crime counts in neighborhoods of different sizes
  • Population: Accident counts in cities with different populations
  • Time periods: Sales in months with different numbers of days

Setting Up an Offset

You include log(exposure) as a term whose coefficient you don't estimate—it's forced to be 1. Most software has a dedicated offset= parameter for this.

The offset shifts the baseline expectation proportionally to exposure, so your model coefficients reflect true rate changes, not confounding from different denominators.

Key Takeaway: Offset terms let you model rates properly in Poisson regression by accounting for different exposure levels, ensuring fair comparisons across observations with unequal denominators.