Actuarial Notes

Linear Mixed Model

Study guides: ATPA, Exam MAS-II, Exam ACIA-CAPSTONE

A Linear Mixed Model (LMM) is a linear regression model for clustered data that includes both fixed effects (parameters that apply to the entire population) and random effects (parameters that vary across groups or subjects). For the n_i observations of cluster i, the model is

\mathbf{Y}_i = \mathbf{X}_i\boldsymbol{\beta} + \mathbf{Z}_i\mathbf{u}_i + \boldsymbol{\varepsilon}_i

  • \boldsymbol{\beta} is the vector of fixed effects, one entry per column of the fixed-effects design matrix \mathbf{X}_i.
  • \mathbf{u}_i \sim N(\mathbf{0}, \mathbf{D}) is the vector of random effects for cluster i, one entry per column of the random-effects design matrix \mathbf{Z}_i.
  • \boldsymbol{\varepsilon}_i \sim N(\mathbf{0}, \mathbf{R}_i) is the vector of residuals, independent of \mathbf{u}_i.
  • \mathbf{D} and \mathbf{R}_i hold the variance components, the covariance parameters \boldsymbol{\theta}.

A fixed-effect coefficient is the same for every cluster. A random effect is a cluster's departure from it, with mean zero. The residual \boldsymbol{\varepsilon}_i is unobservable and has mean zero, so it does not appear in a fitted value.

Claims from 50 policyholders are observed over 4 years, and the model is Y_ = \beta_0 + \beta_1 \text_i + u_i + \varepsilon_ with u_i \sim N(0, \sigma_u^2) and \varepsilon_ \sim N(0, \sigma^2). What are the fixed effects and the random effect, and what does \sigma_u^2 measure?

  • \beta_0 and \beta_1 are fixed effects: the intercept and the age effect shared by every policyholder.
  • u_i is a random intercept: policyholder i's departure from the shared intercept.
  • \sigma_u^2 is the between-policyholder variance, how much policyholders differ in their baseline claim level after age.
  • \sigma^2 is the within-policyholder variance, how much one policyholder's years differ from each other.

The implied marginal model

Integrating the random effects out of the model gives the implied marginal model, with marginal mean and marginal covariance

E[\mathbf{Y}_i] = \mathbf{X}_i\boldsymbol{\beta}

\mathbf{V}_i = \text{Var}(\mathbf{Y}_i) = \mathbf{Z}_i\mathbf{D}\mathbf{Z}_i^T + \mathbf{R}_i

The marginal model still describes the population mean \mathbf{X}_i\boldsymbol{\beta}, but it no longer gives each cluster its own effect. It yields only marginal (population-averaged) predictions, while the mixed model also yields the conditional predictions of the BLUP.

In a random intercept model, \sigma_u^2 = 0.04 and \sigma^2 = 0.16. What are the marginal variance of one observation and the covariance of two observations of the same cluster?

  • With a random intercept, \mathbf{Z}_i is a column of ones and \mathbf{D} = \sigma_u^2, so every entry of \mathbf{Z}_i\mathbf{D}\mathbf{Z}_i^T is 0.04.
  • With \mathbf{R}_i = \sigma^2\mathbf{I}, the diagonal of \mathbf{V}_i is 0.04 + 0.16 = 0.20.
  • The off-diagonal entries of \mathbf{V}_i are 0.04, the covariance of two observations of one cluster.

Estimating the fixed effects

Given the marginal covariance, the fixed effects are estimated by generalized least squares:

\hat{\boldsymbol{\beta}} = \left(\sum_i \mathbf{X}_i^T\mathbf{V}_i^{-1}\mathbf{X}_i\right)^{-1}\sum_i \mathbf{X}_i^T\mathbf{V}_i^{-1}\mathbf{Y}_i

If \mathbf{V}_i is known, \hat{\boldsymbol{\beta}} is the best linear unbiased estimator (BLUE) of \boldsymbol{\beta}. In practice \mathbf{D} and \mathbf{R}_i are estimated by ML or REML and substituted. The estimated variance of \hat{\boldsymbol{\beta}} is then (\sum_i \mathbf{X}_i^T\hat{\mathbf{V}}_i^{-1}\mathbf{X}_i)^{-1}, with \hat{\mathbf{V}}_i treated as if it were the true \mathbf{V}_i. It tends to underestimate the true sampling variability of \hat{\boldsymbol{\beta}}, because it ignores the uncertainty in estimating \mathbf{D} and \mathbf{R}_i. REML corrects the bias of the variance components, not this one.

Tests of fixed effects

A hypothesis about the fixed effects is written H_0\colon \mathbf{L}\boldsymbol{\beta} = \mathbf{0}.

  1. A single fixed-effect parameter (one row of \mathbf{L}) is tested with a t statistic.
  2. A linear hypothesis on several fixed effects (rank of \mathbf{L} above 1) is tested with an F statistic, built from Type 1 (sequential) or Type 3 (partial) \mathbf{L} matrices.
  3. The omnibus Wald test compares the numerator of that F statistic with a \chi^2 distribution whose degrees of freedom are the rank of \mathbf{L}. It is more liberal than the F test because it effectively assumes infinite denominator degrees of freedom.
  4. A likelihood ratio test compares nested models fitted by ML.

The t and F statistics follow exact t and F distributions only for data with certain types of balance. In general they are approximate, and their denominator degrees of freedom must be estimated. The Kenward–Roger method, built for REML fits in small samples, inflates the estimated covariance matrix of the fixed effects to reduce its small-sample bias and then computes Satterthwaite-type denominator degrees of freedom. It matters most in small samples.

Tests of covariance parameters

Likelihood ratio tests can test both fixed-effect parameters and covariance parameters. Two covariance structures with the same fixed effects can be compared by a likelihood ratio test on either fit, but models that differ in their fixed effects must be compared with ML fits.

The Wald Z statistic for a covariance parameter (the estimate divided by its asymptotic standard error) is valid for large samples. It can be unreliable for small data sets and for variance components, whose sampling distributions are skewed or bounded. A likelihood ratio test is the better choice. When the null value, such as a variance of 0, is on the boundary of the parameter space, its statistic is referred to a mixture of \chi^2 distributions.

Removing a random intercept raises -2\,l from 812.4 to 818.0 under REML, with the fixed effects unchanged. Is the random intercept needed at the 5% level?

  • The statistic is 818.0 - 812.4 = 5.6.
  • The null value \sigma_u^2 = 0 is on the boundary, so the statistic is referred to a 50:50 mixture of \chi^2_0 and \chi^2_1.
  • The p-value is half the \chi^2_1 p-value: 0.5 \times P(\chi^2_1 > 5.6) = 0.5 \times 0.018 = 0.009.
  • The p-value is below 0.05, so the random intercept is kept.

The model connects to credibility: the BLUP of a random intercept is a Bühlmann-Straub credibility estimate.

Practice questions

Actuarial Notes