Tutorials › CAS Exam 8 - Advanced Ratemaking › Reference Coding in a Log-Linear Rating Table

CAS Exam 8 · Multiplicative Rating Structures · Tutorial 61 of 989

Reference Coding in a Log-Linear Rating Table

Translate rating-table categories into indicator variables and interpret their coefficients as conditional log-relativities.

Beginner 10 min read

What You'll Learn

  • Encode each categorical factor using indicators for its non-reference levels
  • Identify why a reference level has a coefficient of zero and a multiplier of one
  • Convert log-relativity coefficients into rating-table multipliers
  • Calculate a predicted rate from an intercept and categorical-factor coefficients
  • Interpret main-effect and interaction coefficients with the correct conditions
  • Avoid treating a log-scale coefficient as a direct rate multiplier

From Rating Categories to Coefficients

A rating table assigns factors to categories such as vehicle use, territory, or building type. In a log-linear model, those categories are represented by indicator variables: each indicator is 1 when a risk is in a specified category and 0 otherwise. Choosing one level of each factor as the reference level gives a consistent way to express the table using coefficients.

This tutorial concerns how the coding works and how to read its coefficients. It assumes a positive expected rate, a log link, and categorical rating factors. To keep the examples focused on coding, the models below have no exposure offset; the modeled quantity is the expected rate per exposure unit. A reference-coded coefficient is a model parameter, not necessarily a raw observed class-rate comparison.

Definition: In reference coding, one level of a categorical factor is designated as the reference level. Its indicator is omitted from the linear predictor, or equivalently its coefficient is set to zero. Each other level has an indicator and a coefficient. In a main-effects model with no interactions, a non-reference coefficient is the logarithm of that level’s rate relativity to the reference level.

For a factor with \(K\) levels, the model uses \(K-1\) indicators. For example, if vehicle use has levels Personal, Farm, and Delivery, and Personal is the reference, define \(I_{\text{Farm}}=1\) for a farm-use risk and 0 otherwise, and \(I_{\text{Delivery}}=1\) for a delivery-use risk and 0 otherwise. The Personal level has both indicators equal to zero.

For several categorical factors with main effects only, a log-linear rate model can be written as follows. The \(j\)th factor has reference level \(r_j\), and \(I_{jk}\) indicates a non-reference level \(k\) of that factor.

$$ \log(\mu)=\beta_0+\sum_j\sum_{k\ne r_j}\beta_{jk}I_{jk}, \qquad \mu=\exp(\beta_0)\prod_j\prod_{k\ne r_j}\exp(\beta_{jk}I_{jk}). $$

Here \(\mu\) is the modeled expected rate and \(\beta_0\) is the intercept. When every factor is at its reference level, every indicator is zero, so the predicted rate is \(\exp(\beta_0)\). A non-reference coefficient \(\beta_{jk}\) contributes \(\exp(\beta_{jk})\) as a multiplier when that level is present. In this no-interaction model, that multiplier is the level’s relativity to its factor’s reference level, holding the other factors fixed.

The reference coefficient is zero on the log scale, not because the reference risk has a zero rate, but because its multiplier is \(\exp(0)=1\). The intercept supplies the rate for the all-reference profile. This distinction matters whenever a coefficient table is translated back into rates.

Why the Reference-Level Coefficient Is Zero

The coding rule follows directly by substituting the reference profile into the model. With all factors at reference levels, every indicator is zero. Therefore the linear predictor is \(\beta_0\), and exponentiating gives the baseline rate \(\exp(\beta_0)\). For one factor, compare a risk at non-reference level \(k\) with a risk at the reference level while holding all other factors fixed:

$$ \frac{\mu_k}{\mu_r} = \frac{\exp(\eta_{\text{other}}+\beta_0+\beta_k)} {\exp(\eta_{\text{other}}+\beta_0)} =\exp(\beta_k), \qquad \log\left(\frac{\mu_k}{\mu_r}\right)=\beta_k. $$

The shared terms cancel in the ratio. Thus the coefficient is a log-relativity, and exponentiating it recovers the corresponding multiplicative relativity. The reference level itself has no indicator contribution, so its log-relativity to itself is \(\log(1)=0\). This is the mathematical reason its coefficient is fixed at zero in this coding.

1
Identify the reference profile.
Record the designated reference level for every factor. Those levels have indicator value zero.
2
Write the linear predictor.
Add the intercept and the coefficients for the indicators that equal one.
3
Exponentiate.
The resulting rate equals the baseline rate multiplied by the applicable relativities.
4
Check the interpretation.
For a main-effects model, each coefficient compares its level with its reference level, holding other factors fixed. Check separately for interactions before making that interpretation.

Reading Coefficients in a Main-Effects Model

The intercept and the non-reference coefficients work on different scales. The intercept is the logarithm of the all-reference rate; exponentiating it produces the rate. Each other coefficient is a log-relativity; exponentiating it produces a factor. A coefficient can be negative, which means its relativity is below one, or positive, which means its relativity is above one. Neither sign means that a rate is negative.

Worked Example: A Single Categorical Factor

A hypothetical rating model uses Personal vehicle use as the reference category and Delivery use as the other category. The fitted intercept is \(\beta_0=\log(500)\), and the Delivery coefficient is \(\beta_D=\log(1.4)\). Find the modeled rate for each category and interpret the coefficient. Give money to the cent and show coefficient calculations to four decimal places.

Method. Use reference coding for a one-factor main-effects model. Personal use has indicator \(I_D=0\); Delivery use has \(I_D=1\). The model is \(\log(\mu)=\beta_0+\beta_DI_D\).

For Personal use, substitute \(I_D=0\):

$$ \log(\mu_{\text{Personal}})=\log(500)+\log(1.4)(0)=\log(500), \qquad \mu_{\text{Personal}}=\exp(\log(500))=\$500.00. $$

For Delivery use, substitute \(I_D=1\). The coefficient is \(\log(1.4)\approx0.3365\), and the intercept is \(\log(500)\approx6.2146\). Using the exact logarithms before rounding,

$$ \log(\mu_{\text{Delivery}})=\log(500)+\log(1.4)=\log(700), \qquad \mu_{\text{Delivery}}=\exp(\log(700))=\$700.00. $$

The Delivery coefficient is \(\log(1.4)\), so its relativity to Personal use is \(\exp(\beta_D)=1.4\). The check is \(500(1.4)=700\), matching the model prediction. The common mistake avoided here is to treat the coefficient \(0.3365\) as the rate multiplier; the multiplier is its exponential, \(1.4\).

Worked Example: Combining Two Main Effects

A hypothetical rating table has a base rate of $600 for the reference profile: Inland territory and Personal use. The model gives a Coastal relativity of 1.25 and a Business-use relativity of 1.40. Find the predicted rate for Coastal territory and Business use, and write its linear predictor. Round the rate to the nearest cent and log coefficients to four decimal places.

Method. Encode Coastal and Business use with indicators that each equal 1 for the requested risk. The reference levels are Inland and Personal. The corresponding coefficients are \(\beta_C=\log(1.25)\approx0.2231\) and \(\beta_B=\log(1.40)\approx0.3365\), while \(\beta_0=\log(600)\approx6.3969\).

Both requested indicators equal 1, so the linear predictor is

$$ \eta=\log(600)+\log(1.25)+\log(1.40) =\log(600\times1.25\times1.40) =\log(1050)\approx6.9565. $$

Exponentiating gives \(\mu=\exp(\eta)=600\times1.25\times1.40=\$1{,}050.00\). The factor-by-factor check is \(600\times1.25=\$750.00\), followed by \(750\times1.40=\$1{,}050.00\). Because the model has main effects only, each coefficient retains its stated relativity regardless of the other factor’s level. The common mistake avoided is adding the two percentage increases to the base rate: the specified factors multiply, so the combined multiplier is \(1.25\times1.40=1.75\), not \(1+0.25+0.40=1.65\).

Interactions Qualify a Coefficient’s Meaning

A main-effects model assumes that a factor’s relativity is the same at every level of the other factors. If the model includes an interaction, that need not be true. An interaction term is an additional coefficient attached to a combination of indicator values. Consequently, a main-effect coefficient gives the log-relativity when the interacting factor is at its reference level; at another level, the interaction coefficient also contributes.

Worked Example: Interpreting a Main Effect With an Interaction

A hypothetical rate model uses Rural territory and Personal use as reference levels. Its intercept is \(\log(800)\). The Urban main-effect coefficient is \(\log(1.20)\), the Commercial-use main-effect coefficient is \(\log(1.50)\), and the Urban-by-Commercial interaction coefficient is \(\log(1.10)\). Find the predicted Urban Commercial rate and the Urban-to-Rural relativity for Commercial use. Round money to the nearest cent and coefficients to four decimal places.

Method. Let \(I_U=1\) for Urban territory and \(I_C=1\) for Commercial use. The model includes both main effects and their interaction:

$$ \log(\mu)=\log(800)+\log(1.20)I_U+\log(1.50)I_C +\log(1.10)I_UI_C. $$

For an Urban Commercial risk, both indicators and their product equal 1. The coefficients are approximately \(0.1823\), \(0.4055\), and \(0.0953\), respectively. Thus

$$ \eta=\log(800)+\log(1.20)+\log(1.50)+\log(1.10) =\log(800\times1.20\times1.50\times1.10) =\log(1584). $$

Therefore the predicted rate is \(\exp(\eta)=\$1{,}584.00\). For the Urban-to-Rural comparison among Commercial risks, the Commercial main effect appears in both rates and cancels. The Urban main effect and interaction remain:

$$ \frac{\mu_{\text{Urban, Commercial}}}{\mu_{\text{Rural, Commercial}}} =\exp\{\log(1.20)+\log(1.10)\} =1.20\times1.10=1.32. $$

The Urban coefficient alone gives a relativity of 1.20 when use is at its reference level, Personal. It is not the Urban relativity for Commercial use, which is 1.32. The check is that the Rural Commercial rate is \(800\times1.50=\$1{,}200.00\), and \(1{,}200\times1.32=\$1{,}584.00\). The common mistake avoided is interpreting a main-effect coefficient as an unconditional relativity despite an interaction.

Common Mistakes and a Quick Audit

A coefficient table is easiest to audit by separating the log-scale calculation from the rate-scale calculation. First identify which indicators are 1 for the risk. Then add the corresponding coefficients to the intercept. Only after that should the linear predictor be exponentiated. For a model with interactions, include each interaction term whose indicator product is 1.

For example, suppose a base rate is $600 and a non-reference coefficient is \(\log(1.25)\approx0.2231\). A wrong calculation is \(600(0.2231)=\$133.86\), treating the log coefficient itself as a multiplier. The correct multiplier is \(\exp(0.2231)\), approximately 1.25, so the rate is \(600(1.25)=\$750.00\). The exact coefficient \(\log(1.25)\) gives exactly the stated factor when exponentiated.

  • Zero is a coding contribution, not a zero rate. The reference level contributes zero to the linear predictor and a factor of one to the rate.
  • Exponentiate to get a relativity. A coefficient of \(\beta\) corresponds to the multiplier \(\exp(\beta)\), not \(\beta\) itself.
  • Check for interactions. In a model with interactions, a main-effect coefficient is conditional on the interacting factor or factors being at their reference levels.
  • Use the stated reference levels. The intercept represents the profile with every factor at its designated reference level.
Key takeaway: Under reference coding, each reference level has coefficient zero and multiplier one. In a no-interaction main-effects model, a non-reference coefficient is the log of its relativity to the reference level. With interactions, interpret that coefficient conditionally: the other interacting factors must be at their reference levels.

Check Your Understanding

For each problem, write the relevant indicator contributions before calculating the rate. Answers are rounded to the nearest cent where money is requested.

  1. A hypothetical model has a base rate of $720 for North territory. South has coefficient \(\log(1.15)\), and West has coefficient \(\log(0.90)\). Find the predicted rates for South and West, and state the reference coefficient. (Answer: South $828.00; West $648.00; North coefficient 0.)
  2. A no-interaction model has a base rate of $500 for Standard equipment and Inland territory. Premium equipment has relativity 1.30, while Coastal territory has relativity 0.80. Find the Coastal Premium rate and its total log-relativity to the reference profile. (Answer: Rate $520.00; total log-relativity \(\log(1.30)+\log(0.80)=\log(1.04)\approx0.0392\).)
  3. A model uses Rural and Personal as reference levels. The Urban coefficient is \(\log(1.10)\), the Commercial coefficient is \(\log(1.40)\), and the interaction coefficient is \(\log(1.20)\). Find the Urban Commercial relativity to Rural Personal and the Urban-to-Rural relativity among Commercial risks. (Answer: Urban Commercial relativity \(1.10\times1.40\times1.20=1.848\); Urban-to-Rural relativity for Commercial risks \(1.10\times1.20=1.32\).)
  4. A three-level factor has Low as its reference level and base rate $640. Its Medium coefficient is \(\log(1.25)\), and its High coefficient is \(\log(0.875)\). Calculate both non-reference rates and explain why the Low coefficient is zero rather than \(\log(640)\). (Answer: Medium $800.00; High $560.00; Low coefficient is zero because the intercept \(\log(640)\) supplies the reference rate.)
  5. A model has a base rate of $900, a New-area coefficient of \(\log(1.20)\), a Night-use coefficient of \(\log(1.10)\), and a New-area-by-Night-use interaction of \(\log(0.90)\). Find the New Night-use rate and the New-to-Old relativity among Night-use risks. (Answer: Rate \(900\times1.20\times1.10\times0.90=\$1{,}069.20\); conditional relativity \(1.20\times0.90=1.08\).)
Clinical Biostats