Author-reviewedEvidence: highv1.0.0

Mixed Effects Model

A mixed effects model combines population-level fixed coefficients with probability-modelled variation across groups or individuals to analyse outcomes with clustered or repeated observations.

Last reviewed byDr Darrin Baines

Concept Architecture

Mixed Effects Model: Concept Architecture

Orientation and learning roadmap

This page moves from clustered health observations to a model with population-level coefficients and group-specific deviations. It then works through repeated utility measurements, explains estimation and model checks, and shows what the results can contribute to an economic evaluation.

Why clustered observations change the analysis

Repeated measurements from one patient tend to be more alike than measurements from unrelated patients, and people treated within one clinic may share local influences. An analysis that treats all those observations as independent can misrepresent uncertainty and obscure meaningful variation between patients, clinics, or studies.

The analyst should identify the grouping unit and the target effect before choosing a random intercept, random slope, or another covariance structure. A patient may have multiple visits, patients may be nested within clinics, and a multi-study analysis may have further levels; these are different designs rather than interchangeable labels. The number of distinct groups, not just the number of observations, matters for estimating between-group variation.

Fixed coefficients and random deviations

Fixed effects describe coefficients that apply across the analysed population, conditional on the model's covariates. Random effects represent deviations for sampled groups from a specified population distribution, with an estimated variance or covariance rather than a separate unrelated coefficient for every group.

For a continuous outcome YitY_{it} for patient ii at time tt, a simple random-intercept model with treatment indicator TiT_i is

Yit=β0+β1t+β2Ti+β3tTi+b0i+εit,E(b0i)=0.Y_{it}=\beta_0+\beta_1t+\beta_2T_i+\beta_3tT_i+b_{0i}+\varepsilon_{it}, \qquad E(b_{0i})=0.

Here β0\beta_0 is the modelled comparator mean at t=0t=0, β1\beta_1 its time trend, β2\beta_2 the treatment-group difference at t=0t=0, and β3\beta_3 the difference in time trends. The patient-specific b0ib_{0i} shifts the intercept, while εit\varepsilon_{it} captures remaining observation-level error under a specified residual structure. In the simplest Gaussian version, random effects and residual errors have mean zero, modelled variances, and assumptions about their independence from each other and relevant covariates.

Worked example: repeated health utility

Suppose a fitted linear model for one-year follow-up has β0=0.70\beta_0=0.70, β1=−0.04\beta_1=-0.04 utility units per year, β2=0\beta_2=0, and β3=0.06\beta_3=0.06 utility units per year. These invented values give equal modelled baseline means across strategies and an average difference in change from baseline of 0.060.06 utility units after one year.

Model prediction at year 1Comparator (T=0T=0)Treatment (T=1T=1)
Population mean (b0i=0b_{0i}=0)0.70−0.04=0.660.70-0.04=0.660.70−0.04+0.06=0.720.70-0.04+0.06=0.72
Patient with b0i=+0.03b_{0i}=+0.030.690.690.750.75
Patient with b0i=−0.02b_{0i}=-0.020.640.640.700.70

Each row has a treatment-minus-comparator contrast of 0.060.06 at year 1 because this illustration has no random treatment slope. The patient-specific rows show conditional predictions for hypothetical intercept deviations, not observations that the same person can receive both treatments. A one-year endpoint difference of 0.060.06 is not automatically a 0.060.06-QALY gain over that year; area under the utility trajectories and survival must be considered.

Correlation and alternative structures

A random intercept induces correlation among repeated observations within a patient. Under the simplest homoscedastic random-intercept model, the intraclass correlation coefficient (ICC) is σb2/(σb2+σε2)\sigma_b^2/(\sigma_b^2+\sigma_\varepsilon^2); for illustrative variances 0.010.01 and 0.040.04, it is 0.200.20.

If patients change at different rates, a random time slope can allow both starting levels and trends to vary, with an estimated intercept–slope covariance. Clinic-level effects can be added when patients share a provider or facility, while crossed effects may be needed when classifications overlap instead of nesting cleanly. A random-effects distribution cannot compensate for a wrongly specified mean trend, unmeasured confounding, or an unsupported assumption that group effects are independent of the included predictors.

Fitting, assumptions, and diagnostics

Linear mixed models are commonly estimated using maximum likelihood (ML) or restricted maximum likelihood (REML), with the choice depending on whether fixed-effect structures are being compared and what inference is planned. For binary outcomes, counts, or other non-Gaussian responses, a generalised linear mixed model uses an appropriate link and outcome distribution, so its conditional coefficients are not interpreted on the same scale as a linear utility model.

Check the observed trajectories against fitted values, residual patterns, estimated variance components, and plausible correlation structure. Sparse groups or near-zero random-effect variances can make complex models unstable; convergence warnings and boundary estimates require investigation. Missing follow-up data need a stated missingness assumption and sensitivity analysis, since fitting a mixed model does not by itself cure informative dropout.

Interpretation for health economics

Mixed effects models can analyse repeated utilities, costs, service use, and outcomes in cluster-randomised or multi-centre studies, with the likelihood and scale matched to each outcome. In individual participant data meta-analysis, study-level random effects may represent between-study variation while within-study treatment contrasts remain the relevant evidence for a causal treatment comparison.

For an economic model, report the effect scale, time point, target population, uncertainty, and whether predictions are conditional on a particular group or averaged across groups. Predictions for a new clinic or patient must account for the uncertainty in its unobserved random effect rather than borrowing a known fitted deviation from an existing group. A statistically significant coefficient does not on its own establish clinical importance or cost effectiveness.

Common distinctions and source basis

The word random refers to a probability model for group-specific effects, not to random assignment of treatment. A random-effects meta-analysis of published study estimates is related but uses a different data structure and estimand from an individual-level mixed model; the grouping level and outcome must always be named.

Library

Publications

1
  • Book

    Statistical Analysis of Cost-Effectiveness Data — Willan & Briggs, 1st Edition ed., 2006 (John Wiley & Sons)

    A synthesis of statistical methods for analysing cost-effectiveness data, including net-benefit regression, confidence intervals for the ICER, cost-effectiveness acceptability curves, and covariate adjustment. Part of the Wiley Statistics in Practice series.

Frequently Asked Questions (6)

  • What is a mixed effects model?

    A modelling approach including both fixed effects for average relationships and random effects for individual variation, suited to nested or repeated data.

    Source: Laird & Ware 1982

  • What two kinds of effect does a mixed effects model combine?

    A mixed effects model combines fixed effects, which capture the average relationships that apply across everyone, with random effects, which allow individuals or groups to vary around those averages. This pairing suits data that are nested or repeated, such as patients within clinics or measurements within patients, letting the model describe both the overall pattern and the departures of each unit from it. Modelling the random effects also accounts for the correlation among observations that share a group. Blending shared and individual effects is its structure. Kirkwood and Sterne (2003) describe this approach.

    Source: Kirkwood & Sterne 2003

  • What are fixed and random effects?

    Fixed effects in a mixed model represent average relationships assumed to be the same across the population, such as the average effect of a treatment, while random effects represent variation between individuals or groups, treated as drawn from a distribution, such as each patient's own deviation from the average. So fixed effects capture the overall, population-level relationships of interest, and random effects capture the between-unit variability and the correlation of repeated or nested observations, with the combination allowing a mixed model to estimate average effects while accounting for how individuals or clusters differ, which distinguishes it from models with only fixed effects.

    Source: Laird & Ware 1982

  • When is a mixed effects model used?

    A mixed effects model is used for data with a hierarchical or repeated-measures structure, such as patients within hospitals or repeated measurements on the same individuals, where observations within a unit are correlated and both average effects and individual variation are of interest. So a mixed effects model is used when data are nested or longitudinal, since it accounts for the within-unit correlation that standard methods ignore and models the variation between units, which makes it suitable for analysing clustered and repeated-measures data validly while estimating population-level effects and characterising how individuals or groups differ.

    Source: Laird & Ware 1982

  • What are the advantages of a mixed effects model?

    The advantages of a mixed effects model include correctly handling the correlation in nested or repeated data, giving valid standard errors; estimating both average effects and the variation between units; borrowing strength across units to stabilise estimates for small groups; and accommodating unbalanced data and missing observations under the missing at random assumption. So a mixed effects model is advantageous for analysing hierarchical and longitudinal data, since it provides valid inference, separates population-level from individual-level effects, and handles incomplete and unbalanced data flexibly, which is why it is widely used for clustered and repeated-measures designs where these features matter.

    Source: Laird & Ware 1982

  • How does a mixed effects model handle correlation?

    A mixed effects model handles the correlation among observations within a unit by including random effects, such as a random intercept for each individual, which induce a correlation between that individual's repeated measurements, so the model accounts for their dependence rather than assuming independence. So a mixed effects model handles correlation through its random-effects structure, which represents the shared variation among observations in the same unit and thereby captures their correlation, ensuring valid standard errors and inference, in contrast to standard methods that would treat the correlated observations as independent and understate the uncertainty.

    Source: Laird & Ware 1982

Trust Record

Verified by Dr Darrin Baines

British health economist

Professional identity: darrinbaines.org

Verification date: 25 Sep 2026

Content version: 1.0.0

Canonical Identity

Term code
HE-ES-SA-124
Wikidata
Q1501135

Stable URI · Machine-readable · Resolvable · CC BY 4.0