Skip to main content

Linear Mixed Effects Models

Here we'll be considering an alternative approach for analyzing longitudinal data using linear mixed effects models. These models have some subset of the individual parameters vary randomly from one subject to another, thereby accounting for sources of natural heterogeneity in the population.

  • Fixed effects are the population characteristics that are assumed to be shared by all subjects
  • Random effects are characteristics, unique for each subject
  • The combination of both gives rise to mixed effect models

We can write the linear mixed effects model as:
Yi = Xi β + Zibi + ei 
Where:

  • β is a s*1 vector of fixed effects
  • bi is a q*1 vector of random effects (which follows  ~N(0, G) we will see below)
  • ei is an ni*1 vector of within subject errors (~N(0, Ri)),
  • Xi is an ni*s matrix of covariates, 
  • Zi  is a ni*q matrix of covariates with q <= s

Model Formulation

The simplest mixed effects model for longitudinal data is:
image.png
Where bi (some random intercept) and eij (error) are independent.

The marginal mean response in the population is:
image.png
The response for the ith subject at the jth measurement occasion differs from the population mean response by a subject effect bi, and a within subject measurement error eij.

The conditional mean response for any individual:
image.png

The residuals of profile analysis and parametric curves (ϵij) and parametric curves such that ϵij = bi + eij

Variance and Covariance Structure

image.png
Similarly, the marginal covariance between any pair of responses:
image.png

With some linear algebra we can write the variance-covariance matrix as follows:
image.png

Where ρ is called the intra-cluster correlation coefficient. For ρ > 0, the random intercept mixed effects model is observationally equivalent to a compound symmetry model.

Random Intercept and Slope Model

As the name suggests, this adds a random effect for both the slope and intercept.

Consider the following model:
image.png
Where
image.png

So the variance of each response varies with the time it was taken:
image.png
And likewise the covariance between any pair of responses:
image.png