13 Research methods, statistics, critical review and evidence-based practice13.10 Correlation and regression

13.10.13 Multilevel regression

2 min read1 figure

Written by Resident Doctor Committee · Published

New in the 2027 syllabus

The College added this topic for exams from January 2027.

What it is

Multilevel regression models data organised in groups, such as patients within wards or repeated assessments within people.

Example

Lower level

Higher level

Ward study

Patients

Wards

Longitudinal study

Assessments

People

Service study

Clinicians

Teams

Why the grouping matters

Observations in the same group may resemble each other more than observations from different groups. This is within-group dependence.

Ignoring it can give misleading standard errors. When within-group correlation is positive, intervals are often too narrow, so results look more precise than they are.

Fixed and random effects

Fixed effects describe associations common to the modelled population, such as the average relationship between age and symptom score.

Term

What varies between groups

Random intercept

Baseline level of the outcome

Random slope

Association between a predictor and the outcome

Residual

Remaining variation at the level of single observations

  • Random-intercept model: wards can have different baseline means but share the same age slope.

  • Random-slope model: the rate of symptom change can differ between people.

  • Partial pooling: each group's estimate uses both its own observations and information across groups. This reduces extreme estimates from small groups.

Schematic random-effects models, not fitted patient data. A random intercept allows baseline levels to vary between groups; a random slope additionally allows the predictor-outcome association to vary. Original illustration drawn in Python for MRCPsychiatrist; see images/ATTRIBUTION.md

Worked example: splitting the variance

Take a simple random-intercept linear model with these estimated variances.

Component

Variance

Between wards

4

Within wards

16

  1. Total variance = 4 + 16 = 20.

  2. Intraclass correlation coefficient (the share of variance between groups) = 4 / 20 = 0.20.

  3. So in this model, 20% of outcome variance lies between wards. The calculation does not apply unchanged to every multilevel model.

Traps in interpretation

  • Group-level and individual-level effects can differ. Do not read ward averages as individual associations.

  • With few groups, between-group variance and random-slope estimates can be unreliable, even when the total number of observations is large.

  • The model assumes a chosen nesting structure, mean relationship and random-effect distribution. Multilevel modelling does not automatically remove confounding.