Tutorials › CAS Exam 8 - Advanced Ratemaking › Checking Offset And Link Implementation

CAS Exam 8 · Link Functions and Offsets · Tutorial 96 of 989

Checking Offset And Link Implementation

Learn to verify a GLM prediction by rebuilding its predictor, adding the offset on the link scale, and checking the inverse-link mean and exposure scaling.

Intermediate 10 min read

What You'll Learn

  • Reconstruct the linear predictor and offset separately before applying the inverse link
  • Check Poisson count means against exposure and the modeled rate
  • Audit predictions under a reciprocal or identity link
  • Use exposure units to detect incorrect or duplicated offsets
  • Diagnose common mismatches between software output and hand calculations

Why Hand-Checking a GLM Prediction Matters

A fitted model can return a plausible-looking prediction even when its link or offset has been specified incorrectly. A useful implementation check is to select one record, calculate its predictor by hand, add its offset on the correct scale, and then apply the inverse link. For a frequency model, a second check is to ask whether the expected count changes in proportion to exposure while the expected rate stays fixed.

These checks do not replace model validation or assess whether the chosen predictors are appropriate. They test a narrower but essential question: does the software calculate the stated model? The distinction matters because the model formula, the software's reported linear predictor, and the reported fitted mean may be on different scales.

Definition: In a generalized linear model, the conditional mean \(\mu\) is related to a linear predictor \(\eta\) through a link function \(g\): \(g(\mu)=\eta\). If the model contains an offset \(o\), the complete predictor is \(\eta=\mathbf{x}^{\mathsf T}\boldsymbol{\beta}+o\), where \(\mathbf{x}^{\mathsf T}\boldsymbol{\beta}\) is the estimated-predictor part. The fitted mean is therefore \(\mu=g^{-1}(\mathbf{x}^{\mathsf T}\boldsymbol{\beta}+o)\). The offset is added before the inverse-link transformation.

A Reliable Hand-Check Sequence

For an individual prediction, record the predictor terms, the offset, and the software output separately. Do not infer the scale from a column label alone: software can report a linear predictor with or without an offset, a fitted mean, or a response-scale quantity adjusted for exposure.

1
Identify the response mean.
Write what \(\mu\) represents in context, such as expected claim count for the row or expected loss severity per claim.
2
Calculate the estimated predictor.
Multiply each applicable predictor value by its coefficient and add the intercept. Keep this part separate from the offset.
3
Add the offset on the link scale.
For a log-link frequency model with exposure \(e\), the offset is \(\log(e)\). Check that \(e\) uses the same exposure unit as the modeled rate.
4
Apply the inverse link once.
Transform the complete predictor to obtain the response mean. If the software reports an intermediate predictor, establish whether it includes the offset before comparing.
5
Check interpretation and scaling.
For a count model, divide the fitted expected count by exposure to recover the implied rate. Doubling exposure at the same rate should double expected count.

Why Exposure Is a Log Offset in a Poisson Frequency Model

Suppose claim counts follow a Poisson process with constant rate \(\lambda\) per unit of exposure, conditional on the rating characteristics. For exposure \(e\), the count \(N(e)\) has a Poisson distribution with mean \(e\lambda\). This assumes the rate is constant over the exposure being counted and that disjoint exposure intervals have independent Poisson counts. The rate may depend on the modeled characteristics, but within a given prediction those characteristics are held fixed.

If the rate is modeled with a log link, then \(\log(\lambda)=\mathbf{x}^{\mathsf T}\boldsymbol{\beta}\). Taking the logarithm of the count mean gives the predictor used to calculate the expected count:

$$ \mu=E[N(e)\mid \mathbf{x}]=e\lambda,\qquad \log(\mu)=\log(e)+\log(\lambda) =\log(e)+\mathbf{x}^{\mathsf T}\boldsymbol{\beta}. $$

Thus the offset \(\log(e)\) follows directly from the assumed exposure-proportional mean. Exponentiating gives \(\mu=e\exp(\mathbf{x}^{\mathsf T}\boldsymbol{\beta})\): the rate is \(\exp(\mathbf{x}^{\mathsf T}\boldsymbol{\beta})\), while the expected count is that rate multiplied by exposure. This relationship is the basis for a simple but powerful audit of both the offset and the response-scale prediction.

Worked Example: Auditing a Log-Link Frequency Prediction

A hypothetical insurer models claim counts for a coverage using a Poisson distribution with a log link. Conditional on the rating variables, the count has variance equal to its mean. The modeled annual rate for the reference risk is \(0.10\) claims per policy-year. A territory relativity is \(2.0\), and a vehicle-type relativity is \(1.5\). A record has \(0.5\) policy-years of exposure. Verify the expected count and implied annual rate.

Method. Rebuild the complete log predictor from the base rate, relativities, and exposure offset, then exponentiate. The method avoids treating a rate as though it were already an expected count.

The estimated-predictor part is the logarithm of the reference rate multiplied by both relativities:

$$ \mathbf{x}^{\mathsf T}\boldsymbol{\beta} =\log(0.10)+\log(2.0)+\log(1.5) =\log(0.10\times2.0\times1.5) =\log(0.30). $$

The offset is the logarithm of exposure in policy-years:

$$ o=\log(0.5). $$

The complete predictor and fitted expected count are:

$$ \eta=\log(0.30)+\log(0.5)=\log(0.15), \qquad \widehat{\mu}=\exp(\eta)=0.15\text{ claims}. $$

The implied rate is the expected count divided by the exposure:

$$ \frac{0.15}{0.5}=0.30\text{ claims per policy-year}. $$

The check is consistent: the reference rate \(0.10\) multiplied by the territory and vehicle relativities is \(0.10\times2.0\times1.5=0.30\). Multiplying that rate by \(0.5\) policy-years gives \(0.15\) expected claims. The reported expected count should therefore be \(0.15\), not \(0.30\).

Checking Links Other Than the Log Link

The general audit is not specific to frequency models: calculate the complete predictor on the scale defined by the link, then apply the corresponding inverse link. A log offset is appropriate when exposure enters multiplicatively in the mean under a log link. It is not a universal instruction to add \(\log(e)\) to every GLM. For other links, use the offset actually specified by the model and make sure it is on the link scale.

Worked Example: Checking an Identity-Link Severity Prediction

A hypothetical severity model assumes individual claim severities follow a Gamma distribution with fixed shape parameter \(\alpha=4\) and conditional mean \(\mu\). Under this parameterization, the conditional variance is \(\mu^2/\alpha\). The model uses an identity link. For a record, the intercept is \(120\) dollars, a binary predictor equals \(1\) with coefficient \(30\) dollars, and a prespecified known adjustment is an offset of \(-20\) dollars. Verify the fitted mean and variance.

Method. Add the estimated terms and the offset on the identity-link scale, then use the identity inverse link. This check avoids exponentiating a predictor merely because many ratemaking models use a log link.

The estimated-predictor part is:

$$ \mathbf{x}^{\mathsf T}\boldsymbol{\beta} =120+30(1)=150\text{ dollars}. $$

After adding the known offset, the complete predictor is \(150-20=130\) dollars. The identity link is \(g(\mu)=\mu\), so its inverse is also the identity:

$$ \eta=150+(-20)=130,\qquad \widehat{\mu}=g^{-1}(130)=130\text{ dollars}. $$

The stated Gamma parameterization gives the fitted conditional variance:

$$ \widehat{\operatorname{Var}}(X\mid\mathbf{x}) =\frac{\widehat{\mu}^{\,2}}{\alpha} =\frac{130^2}{4} =\frac{16{,}900}{4} =4{,}225\text{ dollars}^2. $$

The mean is positive, as required for this Gamma model. A response-scale prediction of \(130\) dollars agrees with the hand calculation; a prediction of \(150\) dollars would indicate that the offset was omitted. This example uses an identity link, so no exponential transformation is appropriate.

Audit Exposure Components and Software Output

When exposure is assembled from multiple known components, inspect the value that actually enters the offset. For example, if the modeled exposure is the product of policy-years and covered vehicles, the offset is the logarithm of that product. It is not the sum of the two raw exposure values, and it is not appropriate to add the same exposure adjustment a second time elsewhere in the predictor.

Worked Example: Checking a Combined Vehicle-Year Offset

A hypothetical fleet coverage uses a Poisson distribution for claim count, with variance equal to the conditional mean, and a log link. Its baseline rate is \(0.04\) claims per vehicle-year. A rating factor has relativity \(1.25\). The record represents \(0.75\) policy-years and covers \(2\) vehicles, so its exposure is the product of those quantities in vehicle-years. Verify the fitted mean, implied rate, and the mean for twice the exposure at the same rating characteristics.

Method. Form the exposure in the stated unit, put its logarithm in the offset, and compare the resulting count mean with rate times exposure. This avoids adding raw exposure components or reporting the rate as the count mean.

First calculate exposure:

$$ e=0.75\text{ policy-years}\times2\text{ vehicles} =1.50\text{ vehicle-years}. $$

The estimated-predictor part represents the annual rate after applying the rating factor:

$$ \mathbf{x}^{\mathsf T}\boldsymbol{\beta} =\log(0.04)+\log(1.25) =\log(0.05). $$

The offset is \(\log(1.50)\), so:

$$ \eta=\log(0.05)+\log(1.50)=\log(0.075), \qquad \widehat{\mu}=\exp(\eta)=0.075\text{ claims}. $$

The implied rate is \(0.075/1.50=0.05\) claims per vehicle-year, matching \(0.04\times1.25=0.05\). Doubling exposure to \(3.00\) vehicle-years while holding the rate fixed gives:

$$ \widehat{\mu}_{\text{double exposure}} =0.05\times3.00=0.15\text{ claims} =2(0.075). $$

The check passes if the software returns \(0.075\) for the original expected count and \(0.15\) for the doubled exposure. If it returns \(0.05\) for the original record, it may be reporting a rate rather than a count mean.

Common Implementation Traps

The most common error is applying the offset after the inverse link. For a log-link frequency model with estimated-predictor part \(\log(0.30)\) and exposure \(0.5\), the correct calculation is:

$$ \exp\bigl(\log(0.30)+\log(0.5)\bigr)=0.15. $$

A wrong calculation is \(\exp(\log(0.30))+\log(0.5)=0.30-0.6931=-0.3931\). This is not only incorrect; it produces a negative expected count. A different, subtler mistake is to omit the offset and report \(\exp(\log(0.30))=0.30\) as the expected count. That value is the rate per policy-year, not the expected count for half a policy-year.

  • Comparing unlike output scales. A software column labeled “linear predictor” may not be the response mean. Reconstruct the mean with the inverse link before comparing it with a response-scale prediction.
  • Dropping or duplicating the offset. If the model formula already incorporates an offset, do not add exposure again as an extra predictor with a fixed coefficient of one.
  • Using the wrong exposure unit. An annual rate requires exposure measured in years. Entering six months as \(6\) rather than \(0.5\) changes the offset and expected count by a factor of \(12\).
  • Assuming every link has the same inverse. For an identity link, the predictor is the mean; for a log link, exponentiate it. Follow the model's stated link rather than a familiar default.
Key takeaway: A hand audit should reconcile three quantities: the complete predictor (estimated terms plus offset), the inverse-link mean, and the interpretation of that mean in the response's units. For a log-link frequency model, also verify that expected count equals exposure multiplied by the modeled rate.

Check Your Understanding

For each problem, calculate the requested prediction before checking the answer.

  1. A Poisson log-link model has a rate of \(0.08\) claims per policy-year for the reference risk. One factor has relativity \(1.5\), and the record has \(0.5\) policy-years. Find the expected claim count and implied rate. (Answer: \(0.06\) claims and \(0.12\) claims per policy-year.)
  2. A log-link Poisson model has estimated-predictor part \(\log(0.06)\). The record has \(3.5\) policy-years of exposure. Calculate the offset, expected count, and implied rate. (Answer: offset \(\log(3.5)\), expected count \(0.21\), and implied rate \(0.06\) claims per policy-year.)
  3. A Gamma severity model has fixed shape \(\alpha=5\), variance \(\mu^2/\alpha\), an identity link, intercept \(90\), predictor value \(2\) with coefficient \(15\), and offset \(-10\), all in dollars where applicable. Find the fitted mean and conditional variance. (Answer: mean \(110\) dollars; variance \(2{,}420\) dollars\(^2\).)
  4. A Poisson log-link model has baseline rate \(0.03\) per vehicle-year and a relativity of \(2\). A record has \(0.4\) policy-years and \(3\) vehicles. Find the exposure, expected count, and expected count if policy-years double with the vehicle count and rate unchanged. (Answer: exposure \(1.2\) vehicle-years; expected count \(0.072\); doubled-duration expected count \(0.144\).)
  5. A software result for a Poisson log-link model has estimated-predictor part \(\log(0.20)\) and exposure \(0.25\) years. A reported response-scale mean is \(0.20\). Determine whether it is consistent with the model, and state the correct expected count and rate. (Answer: it is not consistent as a count mean; the correct expected count is \(0.05\) and the rate is \(0.20\) claims per year.)
Clinical Biostats