Tutorials › CAS Exam 8 - Advanced Ratemaking › Selecting Interactions And Nonlinear Complexity

CAS Exam 8 · Model Selection and Rate Indications · Tutorial 277 of 989

Selecting Interactions And Nonlinear Complexity

Compare added model complexity against its predictive value and the credibility of the rating relativities it produces.

Advanced 12 min read

What You'll Learn

  • Apply strong hierarchy when considering interaction terms.
  • Compare nested candidates using deviance changes and AIC.
  • Evaluate nonlinear terms using validation performance and interpretable predictions.
  • Translate interaction coefficients into ratios of rating relativities.
  • Recognize when sparse data make a fitted interaction relativity unstable.
  • Balance fit criteria, out-of-sample results, and rating-use considerations.

Why Added Complexity Needs a Specific Justification

Interactions and nonlinear terms can improve a ratemaking model when the effect of one rating variable depends on another variable, or when a numeric variable has a curved relationship with expected loss. They also consume degrees of freedom and can produce relativities that are difficult to estimate reliably. The selection question is therefore not simply whether a more complex model fits the training data better: a more complex model will generally fit at least as well. The question is whether the improvement is meaningful in fit, out-of-sample prediction, and the resulting rating structure.

For a count response \(Y_i\) observed over exposure \(e_i\), consider a Poisson GLM with a log link:

$$ Y_i \mid \boldsymbol{x}_i \sim \operatorname{Poisson}(\mu_i), \qquad \log(\mu_i)=\log(e_i)+\boldsymbol{x}_i^\mathsf{T}\boldsymbol{\beta}. $$

This model assumes conditionally independent counts and conditional variance equal to the conditional mean. The exposure term is an offset with coefficient fixed at one; equivalently, the modeled frequency is \(\mu_i/e_i\). The examples use this framework to make the mechanics clear. Other response distributions require criteria and assumptions appropriate to those distributions.

Definition: An interaction allows the modeled effect of one predictor to vary with another predictor. A nonlinear term represents a non-straight-line relationship between a predictor and the linear predictor, for example by including a squared, piecewise, or spline term. A rating relativity is a modeled multiplicative factor relative to a stated reference level or profile.

Hierarchy and the Meaning of an Interaction

Suppose \(A\) and \(B\) are binary indicators, each taking values zero or one. A log-link model that includes their interaction is

$$ \log(\mu/e)=\beta_0+\beta_A A+\beta_B B+\beta_{AB}AB. $$

Under the usual strong hierarchy principle, including the interaction \(AB\) requires including both lower-order main effects \(A\) and \(B\). This preserves the interpretation of the interaction as an added departure from the main-effects structure. Weak hierarchy requires at least one of the two main effects; strong hierarchy is a common, more conservative default for rating models. A deliberate exception may be justified by the model design, but should not arise merely because an automated selection procedure omitted a main effect.

The interaction has a direct multiplicative interpretation. Write the fitted means for the four combinations as \(\mu_{00},\mu_{10},\mu_{01},\mu_{11}\), with exposure held fixed. Then

$$ \log\left(\frac{\mu_{11}}{\mu_{01}}\right) - \log\left(\frac{\mu_{10}}{\mu_{00}}\right) =\beta_{AB}, \qquad \frac{\mu_{11}/\mu_{01}}{\mu_{10}/\mu_{00}} =\exp(\beta_{AB}). $$

The first ratio compares the effect of changing \(A\) when \(B=1\); the second compares that effect when \(B=0\). Subtracting the log ratios cancels the intercept and both main effects, leaving \(\beta_{AB}\). Exponentiating gives the ratio of those two relativities. Thus, an interaction does not mean merely that two risk groups have different predicted levels: it means that one factor's multiplicative effect changes across levels of the other.

Worked Example: Testing a Two-Factor Interaction

A hypothetical insurer models claim frequency using indicators for young drivers (\(A=1\)) and rural garaging (\(B=1\)). The main-effects model has deviance 248 and \(k=5\) estimated parameters. Adding the \(A B\) interaction gives deviance 236 and \(k=6\). On the same untouched validation data, Poisson deviance is 126 for the main-effects model and 123 for the interaction model. The fitted main effects are \(\exp(\beta_A)=1.50\) and \(\exp(\beta_B)=1.20\), and the fitted interaction coefficient is \(\beta_{AB}=0.25\). Assess the addition using hierarchy, AIC, validation performance, and predicted frequency relativities. Assume both models use the same response and data for the in-sample comparison.

Method and hierarchy. This is a one-degree-of-freedom nested comparison. The interaction is included together with both main effects, so it satisfies strong hierarchy. Its coefficient represents a multiplicative departure from the main-effects prediction when both indicators equal one.

Information criterion. For models fitted to the same Poisson response, the difference in AIC can be computed from the deviance difference and the change in parameter count: \(\Delta\mathrm{AIC}=\Delta D+2\Delta k\). Here, using interaction model minus main-effects model,

$$ \Delta D=236-248=-12,\qquad \Delta k=6-5=1,\qquad \Delta\mathrm{AIC}=-12+2(1)=-10. $$

The interaction model has AIC 10 points lower, so AIC favors it among these candidates. The validation deviance also falls by \(126-123=3\), a modest out-of-sample improvement on the stated validation set.

Relativities. Taking the neither-young-nor-rural group as the reference, its frequency relativity is 1.00. The young-only relativity is 1.50, and the rural-only relativity is 1.20. For the group with both characteristics, the interaction multiplier is \(\exp(0.25)=1.2840\), so its relativity is

$$ 1.50(1.20)(1.2840)=2.3112. $$

For example, if the reference frequency is 0.0800 claims per policy-year, the fitted frequency for both characteristics is \(0.0800(2.3112)=0.1849\) claims per policy-year. The ratio of the young relativity when rural to the young relativity when not rural is \(2.3112/1.20 \div 1.50/1=1.2840\), which checks the interaction interpretation. The stated fit and validation evidence favor adding the term, but the analyst should still examine whether the interaction estimate is adequately supported by the data. The common mistake is to treat any lower training deviance as sufficient evidence; here the case is stronger because the term also improves the stated validation score and follows hierarchy.

Choosing Nonlinear Complexity

For a numeric predictor \(x\), a linear effect on the log scale has the form \(\beta_1 x\), so a change in \(x\) produces a constant multiplicative change in fitted frequency for each fixed increment. A quadratic extension, often more interpretable when centered and scaled, adds curvature:

$$ \log(\mu/e)=\beta_0+\beta_1 z+\beta_2 z^2, \qquad z=\frac{x-c}{s}, $$

where \(c\) is a chosen center and \(s\) is a positive scaling constant. The linear term should normally remain when the squared term is added. With categorical predictors, the analogous principle is to preserve the lower-order terms needed to interpret the added structure. Splines can represent more flexible curves, but their additional degrees of freedom and behavior near the observed range's boundaries need attention.

A nonlinear term should be judged by a combination of evidence. Information criteria penalize additional fitted parameters; validation scores assess prediction on data not used to fit the candidate; and fitted curves or relativities reveal whether the added structure is plausible and adequately supported. A curve that improves average validation performance can still yield implausible swings in a thinly populated range. Conversely, a small training fit improvement may be valuable if it is stable and material in the range where the model will be used.

Worked Example: Evaluating a Quadratic Age Term

A hypothetical personal-lines model uses a centered age variable \(z=(x-40)/10\). The linear candidate has deviance 310 and \(k=7\); the candidate adding \(z^2\) has deviance 300 and \(k=8\). Their validation deviances are 164 and 159, respectively. In the quadratic fit, \(\beta_1=0.08\) and \(\beta_2=0.03\). Compare the candidates and calculate relativities at ages 30, 40, 50, and 60, relative to age 40. Assume the same Poisson response and in-sample observations are used for both models.

Information criterion and validation. The quadratic term adds one parameter and reduces deviance by \(310-300=10\). Therefore,

$$ \Delta\mathrm{AIC}=(300-310)+2(8-7)=-10+2=-8. $$

AIC favors the quadratic candidate by 8 points. Its validation deviance is also 5 lower, \(159\) rather than \(164\). Both comparisons support the added curvature, although the values alone do not establish whether its shape is appropriate at all ages.

Relativities. Age 40 has \(z=0\), so its relative factor is \(\exp(0)=1.0000\). Age 30 has \(z=(30-40)/10=-1\), giving a log relativity of \(0.08(-1)+0.03(-1)^2=-0.08+0.03=-0.05\), and thus \(\exp(-0.05)=0.9512\). Age 50 has \(z=1\), giving \(0.08(1)+0.03(1)^2=0.11\) and \(\exp(0.11)=1.1163\). Age 60 has \(z=2\), giving \(0.08(2)+0.03(2)^2=0.16+0.12=0.28\) and \(\exp(0.28)=1.3231\).

For comparison, the linear term alone would give age-60 relativity \(\exp(0.08(2))=\exp(0.16)=1.1735\). The quadratic fit therefore assigns a larger age-60 relativity than the linear fit. The example supports the quadratic candidate on the supplied criteria, but a responsible selection also inspects observed support across ages and avoids treating the fitted polynomial as reliable far outside the range represented by the data. The common trap is to substitute the age itself for the centered-and-scaled \(z\), which would produce entirely different, incorrect predictions.

Fit Improvement Versus Relativity Stability

A candidate interaction can be competitive by a fit criterion and still be weakly supported. This can occur when an interaction level has little exposure or few claims. The fitted coefficient may then change substantially when a small number of observations are added, removed, or shifted between estimation samples. Because a log-link coefficient is exponentiated to produce a multiplicative effect, coefficient movement can translate into large changes in a rating relativity.

One useful diagnostic is to examine the coefficient's standard error and the implied range of plausible multiplicative effects. For an approximately normal estimate \(\hat{\beta}\) with standard error \(s\), a rough 95% interval on the coefficient scale is \(\hat{\beta}\pm1.96s\); exponentiating both endpoints gives an interval for the multiplier. This is an approximation, not a guarantee of adequate support, and may be unreliable for very sparse data. Also inspect exposure and claim counts in the cells defined by the interaction, fitted relativities, and whether similar estimates persist under reasonable refits.

Worked Example: A Marginal Fit Gain From a Sparse Interaction

A hypothetical commercial property portfolio is modeled with two rating indicators and their interaction. The main-effects candidate has deviance 102, \(k=6\), and validation deviance 91. The hierarchical interaction candidate has deviance 99.6, \(k=7\), and validation deviance 90. Its interaction estimate is \(\hat{\beta}_{AB}=0.60\) with standard error 0.50. Refitting the interaction model on three validation folds gives interaction estimates 0.60, \(-0.20\), and 0.75. Assess the evidence and quantify the multiplier and approximate coefficient-based interval. Treat all deviance and standard-error values as supplied fitted-model summaries.

Compare criteria. The interaction reduces training deviance by \(102-99.6=2.4\) while adding one parameter. Its AIC difference relative to the main-effects model is

$$ \Delta\mathrm{AIC}=(99.6-102)+2(7-6)=-2.4+2=-0.4. $$

Thus AIC favors the interaction by only 0.4 points, a very small difference. Validation deviance falls by \(91-90=1\), also a small improvement.

Translate the estimate. The interaction multiplier is \(\exp(0.60)=1.8221\). The approximate 95% coefficient interval is \(0.60\pm1.96(0.50)=0.60\pm0.98\), or \([-0.38,1.58]\). Exponentiating gives the approximate multiplier interval \([\exp(-0.38),\exp(1.58)]=[0.6839,4.8540]\). This wide interval includes one, the value representing no interaction.

Check refit stability. The three fold estimates imply multipliers \(\exp(0.60)=1.8221\), \(\exp(-0.20)=0.8187\), and \(\exp(0.75)=2.1170\). The direction changes in one fold, and the estimated size varies considerably. With only a marginal AIC and validation advantage, these results are a warning that the interaction relativity may be weakly supported. A defensible decision could retain the simpler model pending more evidence or assess whether a constrained structure is suitable; it should not treat a small AIC win as conclusive. The common mistake is to report \(1.8221\) as a precise rating effect without showing its uncertainty or sensitivity.

A Practical Selection Sequence

Use a consistent sequence so that candidate terms are evaluated on equal footing. Comparisons should use the same response definition, exposure basis, and relevant estimation and validation data; otherwise, a score difference may reflect changed data rather than changed model structure. For candidate models that are not nested, deviance-difference tests do not automatically apply, so use appropriate information criteria and comparable predictive scores rather than interpreting every deviance difference as a formal test.

1
Specify a defensible structure.
State the proposed interaction or nonlinear term and preserve the lower-order terms required by hierarchy. Identify its reference levels and intended interpretation.
2
Measure the in-sample tradeoff.
For a nested addition, compare deviances and degrees of freedom. Compare AIC or another suitable criterion while recognizing that a lower training deviance alone favors added complexity.
3
Check predictive evidence.
Compare candidates on the same validation observations with a score appropriate to the response. A small score difference should be treated as limited evidence, not as a decisive ranking.
4
Inspect the implied rating effects.
Calculate the relevant relativities, examine uncertainty and cell support, and check whether reasonable refits preserve the direction and approximate size of the effect.
5
Document the choice.
Explain why the retained structure balances fit, prediction, interpretability, and stable estimation. Record meaningful tradeoffs rather than selecting terms by a single statistic.

This approach is aligned with the CAS Exam 8 (Advanced Ratemaking) syllabus. It keeps model selection focused on whether added complexity earns its place, rather than assuming that either the most flexible model or the simplest model is always best.

Key takeaway: An interaction or nonlinear term should earn its place through a defensible structure, improved fit or prediction, and rating relativities that are sufficiently supported. Check hierarchy, compare like with like, and translate coefficients into the multiplicative effects that the model would actually imply.

Check Your Understanding

For each problem, identify the relevant comparison and work through the arithmetic before checking the answer.

  1. A log-link frequency model has binary indicators \(A\) and \(B\). Its proposed interaction coefficient is 0.40. What multiplier does the interaction imply, and which lower-order terms are required under strong hierarchy? (Answer: The interaction multiplier is \(\exp(0.40)=1.4918\); include both \(A\) and \(B\) main effects.)
  2. A Poisson model with four parameters has deviance 180. Adding one term gives deviance 172 and five parameters. Find the AIC difference, added model minus original, and state the preference. (Answer: \((-8)+2(1)=-6\); AIC favors the model with the added term by 6 points.)
  3. A centered predictor has \(z=(x-50)/10\), and a quadratic model has \(\beta_1=0.06\), \(\beta_2=0.02\). Calculate the relativities at \(x=40\) and \(x=60\), relative to \(x=50\). (Answer: At \(x=40\), \(z=-1\), so \(\exp(-0.06+0.02)=\exp(-0.04)=0.9608\); at \(x=60\), \(z=1\), so \(\exp(0.06+0.02)=\exp(0.08)=1.0833\).)
  4. Two candidates have validation deviances 72 and 70 on the same data. The second candidate uses three additional parameters. Which has the lower validation deviance, and what can be concluded from that comparison alone? (Answer: The second candidate is lower by 2; that score favors it on this validation comparison, but the comparison alone does not establish a material or stable rating improvement.)
  5. An interaction estimate is 0.35 with standard error 0.25. Calculate its multiplier and approximate 95% multiplier interval using the normal approximation. (Answer: The multiplier is \(\exp(0.35)=1.4191\); the coefficient interval is \(0.35\pm1.96(0.25)=[-0.14,0.84]\), giving multiplier interval \([\exp(-0.14),\exp(0.84)]=[0.8694,2.3164]\).)
Clinical Biostats