Why Exposure and Weights Are Not Interchangeable
A count of 12 claims from 500 policy-years does not represent the same observed rate as 12 claims from 5,000 policy-years. A model for counts must account for the amount of time or number of units at risk. In a generalized linear model, a known exposure multiplier is represented by an offset. A weight serves a different purpose: it changes how strongly an observation contributes to the fitting criterion.
The distinction matters whenever records have unequal observation periods, or when one data row stands for several identical records. Confusing the two can change the question the model answers. This tutorial uses Poisson count models to make the difference precise; the same conceptual distinction applies more broadly in generalized linear models.
Set Up the Count Model First
Suppose counts \(Y_i\) are conditionally independent and satisfy \(Y_i\sim\operatorname{Poisson}(\mu_i)\). For a rate model, assume that the expected count is proportional to known exposure \(e_i\), and that the underlying rate per exposure unit is \(\lambda_i=\exp(\mathbf{x}_i^\mathsf{T}\boldsymbol{\beta})\). Then
Here, exposure might be policy-years, machine-hours, or another suitable amount at risk. The proportionality assumption says that doubling exposure, with the rate and other predictors unchanged, doubles the expected count. An offset is appropriate when that exposure multiplier is known and has this proportional effect. It is not a substitute for modeling an exposure effect that is genuinely unknown or not proportional.
For \(e_i>0\), \(\log(e_i)\) is included as a fixed offset. If an observation has zero exposure, it provides no at-risk time for estimating a rate and should not be handled by taking \(\log(0)\). The data and modeling setup need to address such an observation explicitly.
Why the Offset Produces the Right Rate Estimate
The reason exposure enters as an offset can be seen directly from the Poisson likelihood. For independent counts with the stated means, the log-likelihood, ignoring no terms that depend on the parameters, is
Substituting \(\mu_i=e_i\exp(\mathbf{x}_i^\mathsf{T}\boldsymbol{\beta})\) gives
The exposure is known, so \(\log(e_i)\) is not an estimated coefficient. It nevertheless appears in the mean through the term \(e_i\exp(\mathbf{x}_i^\mathsf{T}\boldsymbol{\beta})\). Differentiating with respect to \(\boldsymbol{\beta}\) yields the score equation
For an intercept-only rate, let \(\lambda_i=\lambda=\exp(\beta_0)\). Then \(\mu_i=e_i\lambda\), and the score for \(\beta_0\) is
Thus the fitted constant rate is total count divided by total exposure, not an unweighted average of the individual observed rates. Exposure affects the expected count and, through the likelihood, the rate estimate.
What a Weight Changes
In a weighted likelihood, a nonnegative weight \(w_i\) multiplies the log-likelihood contribution for record \(i\). For the Poisson model, the weighted objective is
The corresponding score equation is \(\sum_i w_i\mathbf{x}_i(y_i-\mu_i)=\mathbf{0}\). The weight changes the influence of that record in fitting the parameters; the conditional mean remains \(\mu_i=e_i\exp(\mathbf{x}_i^\mathsf{T}\boldsymbol{\beta})\) if an exposure offset is in the model. Different kinds of weights have different interpretations. For example, a frequency weight can represent repeated identical records. Other weighting schemes require their own justification and may lead to different interpretations of uncertainty.
This distinction does not mean that exposure has no effect on how informative a count is. Under the Poisson rate model, a longer exposure generally provides more information about the rate. That effect is already part of the count model and its likelihood when the offset is specified. It does not make exposure interchangeable with a weight.
| Model component | What it changes | Typical role |
|---|---|---|
| Offset \(\log(e_i)\) | The modeled mean: \(\mu_i=e_i\lambda_i\) | Known amount of exposure at risk |
| Weight \(w_i\) | The record's contribution to the fitting criterion | Replicated records or another justified weighting scheme |
| Offset and weight together | Both the mean structure and the contribution | Weighted records with unequal known exposures |
Worked Examples
Worked Example: Pooling Unequal Exposures
A hypothetical insurer observes 20 claims over 1,000 policy-years in one group and 30 claims over 3,000 policy-years in another. Assume independent Poisson counts with a common constant claim rate per policy-year. Estimate the rate using an offset model, then compare it with the unweighted average of the two observed rates.
Method. Fit an intercept-only Poisson rate model with \(\log(e_i)\) as an offset. The counts are \(y_1=20\), \(y_2=30\), and the exposures are \(e_1=1{,}000\), \(e_2=3{,}000\).
The total count is \(20+30=50\). The total exposure is \(1{,}000+3{,}000=4{,}000\) policy-years. By the score equation for the intercept-only model,
The fitted expected counts are \(1{,}000(0.0125)=12.5\) and \(3{,}000(0.0125)=37.5\). They sum to \(12.5+37.5=50\), the observed total, which checks the intercept-only fit.
The individual observed rates are \(20/1{,}000=0.0200\) and \(30/3{,}000=0.0100\). Their unweighted average is \((0.0200+0.0100)/2=0.0150\), not the likelihood estimate \(0.0125\). Common mistake avoided: averaging group rates equally ignores that the groups contribute different amounts of exposure. The offset-model estimate pools counts over total exposure.
Worked Example: Comparing Rate Effects with Count Effects
A hypothetical service program records events for two customer types. Type A has 100 customer-years and 10 events; type B has 300 customer-years and 60 events. Let \(x=0\) for type A and \(x=1\) for type B. Assume independent Poisson counts and model the rate as \(\lambda(x)=\exp(\beta_0+\beta_1x)\). Find the rate ratio and explain how omitting exposure changes the comparison.
Method. Include \(\log(e_i)\) as an offset. Because there are two type-specific rates and two observations, the fitted expected count in each type equals its observed count. For type A,
For type B,
Therefore the rate ratio is
The estimated rate for type B is twice the estimated rate for type A. If exposure were omitted, the count ratio would be \(60/10=6\), suggesting a sixfold difference in expected counts at equal exposure. That is a different comparison: the observed exposures are not equal. Common mistake avoided: interpreting a ratio of counts as a ratio of rates when the amounts at risk differ.
Worked Example: Using an Offset and a Frequency Weight Together
A hypothetical data file has two rows. Row 1 represents two identical, independent records, each with 100 machine-hours and one event. Row 2 represents one record with 100 machine-hours and four events. Assume all records share one Poisson event rate per machine-hour. Estimate the rate, and identify the separate roles of the offset and frequency weight.
Method. Use a frequency weight \(w_1=2\) for row 1 and \(w_2=1\) for row 2, and use \(\log(100)\) as the offset for each record. For the constant rate, the weighted score equation gives
The two records represented by row 1 contribute \(2(1)=2\) events over \(2(100)=200\) machine-hours. Row 2 contributes 4 events over 100 machine-hours. The combined data therefore have 6 events over 300 machine-hours, confirming the estimate. The offset makes each record's mean \(100\lambda\); the frequency weight counts row 1 twice in the fitting criterion.
If the offset were omitted and the model were instead a common Poisson mean per row, the frequency-weighted mean count per record would be \([2(1)+1(4)]/(2+1)=2\) events per record. That is not a rate per machine-hour. Common mistake avoided: treating the frequency weight as if it converted a count model into an exposure-rate model. The weight represents repeated records; the offset represents machine-hours.
Choosing the Correct Representation
Before fitting, state what one row represents and what the response measures. If the response is a count accumulated over a known exposure, a proportional rate model uses that exposure in the mean, typically through a log-offset. If a row represents repeated identical records, a frequency weight may encode the number of records. If both conditions hold, both components may be needed. A weight should not be chosen merely because a quantity is large or because it seems to measure information.
In R, these modeling roles are represented separately: a Poisson GLM can specify an offset based on log exposure, and a fitting weight can be supplied separately when the data structure and intended weighting justify it. The syntax does not determine whether the model is conceptually correct. Check that positive exposure units are consistent, the response is a count on the modeled observational unit, and any weight has a defensible interpretation.
- Use an offset when exposure is known and the expected count is proportional to it, with the proportionality coefficient fixed at one on the log scale.
- Use a weight when the fitting procedure should give an observation a specified contribution, such as when a frequency weight represents replicated records.
- Use both when records have known exposure and also carry a justified weight.
- Do not substitute one for the other. An offset changes the expected count; a weight changes how the record contributes to fitting.
Check Your Understanding
For each problem, identify whether exposure, a weight, or both are required, and use the stated model assumptions.
- A hypothetical district records 12 incidents in 600 operating-days and 18 incidents in 1,200 operating-days. Under a common Poisson rate, find the offset-model estimate per operating-day. (Answer: \(30/1{,}800=0.0167\) incidents per operating-day, to 4 decimals.)
- Two hypothetical facilities have counts 8 and 24 over exposures of 200 and 400 hours, respectively. Under a two-rate Poisson model with a log-exposure offset, what is the estimated rate ratio for facility 2 relative to facility 1? (Answer: \((24/400)/(8/200)=1.5\).)
- A Poisson model has \(\mu_i=e_i\exp(\beta_0)\), with counts 5 and 15 and exposures 100 and 500. Find the maximum-likelihood estimate of \(\exp(\beta_0)\). (Answer: \((5+15)/(100+500)=1/30\) per exposure unit.)
- A row records three replicated independent records, each with 2 events and 50 exposure units. A second row records one record with 4 events and 100 exposure units. With a common Poisson rate, calculate the frequency-weighted estimate using an exposure offset. (Answer: \([3(2)+1(4)]/[3(50)+1(100)]=10/250=0.04\) events per exposure unit.)
- A model uses counts as the response and includes \(\log(e_i)\) as an offset. A proposed change multiplies each record's log-likelihood contribution by its exposure \(e_i\). Explain why that is not simply another way to include exposure. (Answer: the offset makes the modeled mean \(e_i\lambda_i\); multiplying the likelihood contribution by \(e_i\) additionally changes the record's fitting influence.)