Actuarial Notes

Model Diagnostics

Study guides: Exam SRM, Exam MAS-I, Exam MAS-II, Exam ACIA-CAPSTONE, Exam GI-301

Model Diagnostics are the plots and statistics used after a model is fitted to check whether its assumptions hold, and which one fails when they do not. They judge the quality of fit of a model whose overall fit has been measured by deviance, AIC or R^2. A multivariate method such as a GLM provides these diagnostics, with standard errors and significance tests, where a one-way analysis provides none. Each assumption has its own diagnostics:

Assumption Diagnostic Sign that it fails
Mean structure Residual plot against the fitted values and against each predictor, marginal model plot, added variable plot A trend or curvature, or two smooths that separate
Variance Residual plot against the fitted values, box plots of residuals by group A spread that changes across the plot
Distribution QQ plot of the residuals Points that stray from the straight reference line
Independence Residuals against time or collection order Runs of residuals with the same sign
Influence Leverage, Cook's distance A record whose removal changes the estimates materially

Each plot has its own page: the residual plot, the marginal model plot, the added variable plot and the QQ plot. A plot of Pearson residuals against a candidate variable not in the model shows, by a pattern, that adding the variable would improve the model. An outlier in a residual plot, or residuals that stray from the line of a QQ plot, are signs that the model needs adjusting.

Remedies for a nonlinear predictor

When a residual plot or a marginal model plot shows that a continuous predictor's effect is not linear, the linear term is replaced by one of three terms:

  1. A banded term, which groups the predictor's values into ranges and treats them as levels of a categorical predictor.
  2. A piecewise linear term, which fits a separate slope on each segment of the predictor.
  3. A spline term, which fits a smooth curve.

A piecewise linear term with one hinge point k adds to the linear predictor

\beta_1 x + \beta_2 \max(x - k,\, 0)

  • x is the predictor's value.
  • \beta_1 is the slope below k, and \beta_1 + \beta_2 is the slope above k.

A model includes driver age through \beta_1 x + \beta_2 \max(x - 40, 0) with \hat_1 = 0.02 and \hat_2 = 0.03. What does the term add to the linear predictor for a driver aged 60?

  • The first part is 0.02 \times 60 = 1.2.
  • The driver is 60 - 40 = 20 years past the hinge, so the second part is 0.03 \times 20 = 0.6.
  • The term adds 1.2 + 0.6 = 1.8 to the linear predictor.

Heteroscedasticity

Heteroscedasticity is a variance of the errors that is not constant across observations. It is checked by plotting the residuals against the predicted values, against each predictor and by group, for example with side-by-side box plots. When the model's variance function is specified correctly, it absorbs the heteroscedasticity, and the normalized residuals of the refitted model show a roughly constant spread.

Cook's distance

Cook's distance measures the influence of observation i on the fitted model: how much the parameter estimates change when the observation is removed. For a linear regression with p predictors and an intercept, Cook's distance is

D_i = \frac{r_i^2}{p + 1} \cdot \frac{h_{ii}}{1 - h_{ii}}

  • r_i = \dfrac{e_i}{\hat{\sigma}\sqrt{1 - h_{ii}}} is the standardized residual of observation i.
  • h_{ii} is the leverage of observation i, the ith diagonal element of the hat matrix \mathbf{H}.
  • p + 1 is the number of coefficients, including the intercept.

Written in terms of the residual e_i and the error variance estimate \hat{\sigma}^2, Cook's distance is

D_i = \frac{e_i^2}{(p + 1)\,\hat{\sigma}^2} \cdot \frac{h_{ii}}{(1 - h_{ii})^2}

An observation is classified as influential when D_i exceeds a chosen threshold, often 1. An observation with a leverage near 1 can have a large D_i even with a small residual.

A regression with 4 predictors and an intercept is fitted to 50 policies. Policy A has leverage 0.30 and standardized residual 2.1. Policy B has leverage 0.04 and standardized residual 3.0. Which policy is more influential?

  • For policy A, D_A = \frac{2.1^2}{5} \times \frac{0.30}{0.70} = 0.378.
  • For policy B, D_B = \frac{3.0^2}{5} \times \frac{0.04}{0.96} = 0.075.
  • Policy B has the larger residual, but its low leverage keeps its influence small.
  • Policy A is more influential, although neither exceeds the threshold of 1.

Treating a large residual as an influential point A large residual makes an observation an outlier, but its influence also depends on its leverage. An outlier among typical predictor values barely moves the fit, while a high-leverage point with a modest residual can move it a great deal.

Practice questions

Actuarial Notes