Why Predictor Representation Matters
A continuous rating variable, such as the age of a building or annual mileage, can be represented in several ways in a generalized linear model. The representation determines which shapes the model can fit: a set of discrete steps, a smooth global curve, or a curve whose local slopes can change. Choosing a representation is therefore a modeling decision, not just a data-formatting choice.
Consider a log-link model for an expected claim response \(\mu_i\), with exposure \(e_i\) and continuous predictor \(x_i\):
Here \(g(x_i)\) is the predictor effect, and \(\log(e_i)\) is an offset when exposure is included. Comparing two risks with equal exposure and identical values of all other predictors, the fitted relativity at \(x_a\) versus \(x_b\) is \(\exp\{g(x_a)-g(x_b)\}\). The three representations discussed here differ in how they define \(g\).
Binning: Simple Categories, Step-Shaped Effects
Binning replaces the original continuous values with intervals. For example, a mileage predictor might be grouped into \(0\) to \(5\), \(5\) to \(10\), and \(10\) to \(15\) thousand miles. A categorical coefficient is then estimated for each interval, usually with one interval as the reference. This can be easy to explain and can avoid imposing a particular smooth curve.
The cost is a strong within-bin assumption: all values in a bin have the same fitted effect, regardless of their distance from one another. The model can also jump abruptly at a cutpoint. An observation just below a boundary may receive a different fitted relativity from one just above it, even if their predictor values are nearly identical. The placement of cutpoints matters, and very fine bins may leave some categories with little data.
Worked Example: Interpreting Binned Relativities
A hypothetical property rating model uses annual mileage in thousands. It assigns mileage to three intervals: \(0\) to less than \(5\), \(5\) to less than \(10\), and \(10\) to \(15\), with the first interval as reference. Under a log link, the fitted bin coefficients are \(0\), \(0.12\), and \(0.28\). Find the relativity for a property with mileage \(7.2\) versus one with mileage \(3.6\), and for mileage \(12.0\) versus \(3.6\).
Method. Identify the bin for each value, subtract the reference-bin log effect, and exponentiate the difference. The value \(7.2\) is in the second bin; \(3.6\) is in the reference bin. Thus the log-effect difference is \(0.12-0=0.12\), and the relativity is \(\exp(0.12)=1.1275\).
The value \(12.0\) is in the third bin. Its log-effect difference from \(3.6\) is \(0.28-0=0.28\), so the relativity is \(\exp(0.28)=1.3231\). Each result compares fitted means at equal exposure and with all other model factors held fixed. The calculation is checked by noting that both differences are positive, so both relativities must exceed \(1\).
Common mistake avoided: Treating the coefficient \(0.12\) as a \(12\%\) increase. It is a difference on the log scale; the exact relativity is \(\exp(0.12)\), or about \(12.75\%\) above the reference.
Polynomial Effects: A Global Curve
A polynomial effect uses powers of a continuous predictor. A quadratic log effect, for instance, can be written \(g(x)=\beta_1x+\beta_2x^2\), possibly with an intercept or other terms in the model. The fitted effect changes continuously with \(x\), but its shape is constrained by the polynomial coefficients. A quadratic can curve once; it cannot independently adjust its slope in several separate regions.
Centering the predictor can make coefficients easier to work with. If \(z=x-c\), where \(c\) is a chosen reference value, the effect can be written \(g(x)=\beta_1z+\beta_2z^2\). The effect is zero at \(x=c\) under this parameterization, and the linear coefficient describes the local slope there. Centering changes the coefficient representation, not the fitted curve, when the model includes the corresponding terms.
Worked Example: Calculating a Quadratic Relativity
Suppose a hypothetical log-link frequency model uses \(z=x-5\) and \(g(x)=0.04z-0.002z^2\), where \(x\) is a continuous rating measure. Calculate the fitted relativities at \(x=2\) and \(x=8\), each versus \(x=5\), and find the log-effect difference between \(x=8\) and \(x=2\).
At \(x=2\): \(z=2-5=-3\), so \(z^2=9\). The log effect is \(0.04(-3)-0.002(9)=-0.12-0.018=-0.138\). Relative to \(x=5\), whose centered value is \(z=0\) and effect is \(0\), the relativity is \(\exp(-0.138)=0.8711\).
At \(x=8\): \(z=8-5=3\), so \(z^2=9\). The log effect is \(0.04(3)-0.002(9)=0.12-0.018=0.102\). Relative to \(x=5\), the relativity is \(\exp(0.102)=1.1074\).
Comparing \(x=8\) with \(x=2\): the log-effect difference is \(0.102-(-0.138)=0.240\). Therefore the relativity is \(\exp(0.240)=1.2712\). The check is consistent: \(1.1074/0.8711\) is approximately \(1.2712\), allowing for rounding.
Common mistake avoided: Comparing the two relativities by subtracting them. A ratio of fitted means is obtained by exponentiating the difference in log effects, or equivalently by dividing their relativities to the same reference.
Splines: Local Flexibility With Joined Pieces
A spline allows the fitted effect to change its slope at selected knots while imposing specified smoothness where the pieces meet. A piecewise-linear spline with knots \(k_1,\ldots,k_J\) can be written using truncated linear terms:
Below a knot \(k_j\), its truncated term is zero; above the knot, the term increases linearly with \(x-k_j\). The fitted effect is continuous at each knot, while its slope may change there. A cubic spline uses higher-degree pieces and can impose additional smoothness, but it still requires choices about basis, knots, and any smoothing constraint. Those choices affect flexibility and the shape the model can fit.
A spline’s coefficients are generally less directly interpretable than bin relativities. The fitted effect at a particular predictor value is obtained by evaluating all basis terms, and comparisons are made by taking differences in those fitted effects. A knot is not itself a category boundary: for a continuous spline, the fitted effect does not jump at the knot.
Worked Example: Evaluating a Piecewise-Linear Spline
A hypothetical log-link model uses \(g(x)=0.02x+0.03(x-5)_++0.09(x-7)_+\). Find the relativity at \(x=8\) versus \(x=5\), and evaluate the effect at \(x=2\). Use the same exposure and other rating factors in each comparison.
At \(x=5\): the raw difference for the first knot is \(5-5=0\), and for the second it is \(5-7=-2\). Their positive parts are both \(0\). Thus \(g(5)=0.02(5)+0.03(0)+0.09(0)=0.10\).
At \(x=8\): the raw knot differences are \(8-5=3\) and \(8-7=1\), so both positive parts are unchanged. Therefore \(g(8)=0.02(8)+0.03(3)+0.09(1)=0.16+0.09+0.09=0.34\). The difference from \(x=5\) is \(0.34-0.10=0.24\), so the relativity is \(\exp(0.24)=1.2712\).
At \(x=2\): for a knot at \(4\), the raw difference is \(2-4=-2\). Applying the positive-part operation gives \((2-4)_+=\max(-2,0)=0\). For the two knots in this model, the raw differences are \(2-5=-3\) and \(2-7=-5\), whose positive parts are also zero. Thus \(g(2)=0.02(2)=0.04\).
Common mistake avoided: The raw difference \(x-k\) is not always the value of the truncated spline basis. At \(x=2\) and \(k=4\), the raw difference is \(-2\), but the basis value is \(0\) after applying the positive-part operation. The calculation must show both steps.
Justification: Why Log-Effect Differences Give Relativities
The comparison rule used above follows directly from the log link. Suppose two otherwise identical risks have the same exposure \(e\), and their fitted means satisfy \(\log(\mu_a)=\log(e)+\alpha+g(x_a)\) and \(\log(\mu_b)=\log(e)+\alpha+g(x_b)\). Subtracting the equations cancels the common exposure and intercept:
Exponentiating both sides gives \(\mu_a/\mu_b=\exp\{g(x_a)-g(x_b)\}\). Thus coefficients and effects on the linear-predictor scale are not percentage changes themselves; their exponentials determine mean ratios. If exposure or other predictors differ between the risks, their contributions must also be included in the comparison.
Choosing Among the Representations
No representation is best in every setting. The appropriate choice depends on the shape that is plausible, the amount and distribution of data, and how the resulting rating effect must be communicated. A model with more flexibility can represent more patterns, but it can also become harder to summarize and may be weakly informed where observations are sparse. These are modeling considerations; the fit still needs to be assessed using suitable validation and diagnostics.
| Representation | Shape assumption | Strength | Important limitation |
|---|---|---|---|
| Binned effect | Constant within each interval; possible jumps at boundaries | Easy to explain as category relativities | Cutpoints can drive results; within-bin differences are ignored |
| Polynomial effect | One global polynomial shape | Compact smooth curve with few terms | Global form can be restrictive, and extrapolation may behave poorly |
| Spline effect | Joined pieces with continuity and chosen knot structure | Local changes in slope or curvature can be represented | Knot and basis choices affect the result; coefficients need evaluation to interpret |
For all three approaches, communicate the fitted shape and the comparison being made, not just a coefficient. A binned coefficient is relative to its reference category; a polynomial coefficient is conditional on the other powers and the predictor’s coding; a spline coefficient belongs to a basis term. In each case, fitted relativities at meaningful predictor values are often the clearest comparison.
A common exam trap is to interpret the model form as if it guaranteed a particular empirical result. For example, a spline permits a slope change at a knot but does not require a large change there; a quadratic can curve but may estimate little curvature; and bins permit jumps but do not establish that a genuine discontinuity exists. The representation describes what the model can fit, not what the data must show.
Check Your Understanding
For each question, identify the representation and calculate or interpret the requested quantity.
- A binned log-link model uses a reference effect of \(0\) and a coefficient of \(0.18\) for the interval containing a risk’s predictor value. What is that interval’s relativity to the reference? (Answer: \(\exp(0.18)=1.1972\).)
- A polynomial effect is \(g(x)=0.03z-0.001z^2\), where \(z=x-10\). Find the relativity at \(x=14\) versus \(x=6\). (Answer: \(g(14)=0.104\), \(g(6)=-0.136\), so \(\exp(0.240)=1.2712\).)
- A piecewise-linear spline has \(g(x)=0.015x+0.025(x-4)_+\). Find the relativity at \(x=8\) versus \(x=2\). (Answer: \(g(8)=0.12+0.10=0.22\), \(g(2)=0.03+0=0.03\), so \(\exp(0.19)=1.2092\).)
- For the truncated basis \((x-4)_+\), evaluate the raw difference and basis value at \(x=2\). (Answer: The raw difference is \(2-4=-2\); the basis value is \(\max(-2,0)=0\).)
- A proposed binned model assigns the same effect to every predictor value from \(5\) up to but not including \(10\). State its key within-interval assumption and one potential boundary issue. (Answer: The fitted effect is constant throughout that interval; values immediately on opposite sides of a cutpoint can receive different effects.)