Concept Architecture
Concept
Theoretically, a Mixed Effects Model is a statistical model that combines fixed effects, representing population-average relationships, with random effects, representing subject-specific or cluster-specific variation. The method extends classical regression by explicitly modelling the hierarchical or correlated structure of repeated measurements and clustered data. Mixed effects models exist to produce valid statistical inference when observations are not independent, allowing both within-group and between-group sources of variability to be estimated simultaneously.
Mathematically, a mixed effects model represents the outcome as the sum of fixed-effect predictors, random-effect components and residual error. Fixed effects estimate average relationships across the population, while random effects are assumed to arise from specified probability distributions, typically multivariate normal distributions. Model parameters are commonly estimated using Maximum Likelihood (ML) or Restricted Maximum Likelihood (REML), with covariance structures describing the dependence among repeated observations.
In practice, mixed effects models are fitted to longitudinal, clustered and multilevel datasets. In health economics, they are widely used to analyse repeated measurements of healthcare costs, quality-adjusted life years, patient-reported outcomes and clinical endpoints collected over time. They are particularly valuable for analysing incomplete longitudinal datasets under the Missing at Random assumption because all available observations contribute to parameter estimation without requiring complete follow-up for every participant.
Purpose
Used to model correlated and hierarchical data, estimate both population-average and subject-specific effects, analyse longitudinal outcomes and account for within-cluster dependence in health economic and clinical research.
Mathematical Formulae
Primary Formula
General linear mixed model:
Y = X? + Zb + �
where:
- Y = vector of observed outcomes
- X = fixed-effects design matrix
- ? = vector of fixed-effect parameters
- Z = random-effects design matrix
- b = vector of random effects
- � = residual error
Random effects:
b ~ N(0, G)
Residual errors:
� ~ N(0, R)
Supporting Formulae
Marginal distribution:
Y ~ N(X?, ZGZ? + R)
Restricted Maximum Likelihood objective:
REML = arg max L?(?, G, R)
Intraclass Correlation Coefficient:
ICC = ��b / (��b + ���)
Related Mathematical Methods
- Linear Mixed Models
- Generalised Linear Mixed Models
- Maximum Likelihood Estimation
- Restricted Maximum Likelihood
- Random Effects Models
- Longitudinal Data Analysis
- Hierarchical Linear Models
Example
A health economist analyses EQ-5D utility scores measured at baseline, 6 months, 12 months and 24 months for 900 patients participating in a clinical trial.
A mixed effects model includes:
- Fixed effects for treatment, time and treatment-by-time interaction.
- A random intercept for each patient.
The estimated treatment effect at 24 months is:
?? = 0.047
95% CI = 0.028 to 0.066
The random intercept variance is:
��b = 0.081
Residual variance:
��� = 0.119
The Intraclass Correlation Coefficient is:
ICC = 0.081 / (0.081 + 0.119)
ICC = 0.405
This indicates that approximately 40.5% of the variability in utility scores is attributable to differences between patients, while the remaining variability reflects within-patient change over time.
Excel Implementation
| Function | Example Formula | Health Economics Application |
|---|---|---|
| LINEST | =LINEST(B2:B901,C2:F901,TRUE,TRUE) | Estimate simplified fixed effects for exploratory analyses. |
| MMULT | =MMULT(A2:C901,D2:F4) | Perform matrix calculations used in mixed-model estimation. |
| MINVERSE | =MINVERSE(MMULT(TRANSPOSE(A2:C901),A2:C901)) | Compute matrix inverses required in estimation algorithms. |
| Solver | Maximise the likelihood or restricted likelihood function by varying variance components. | Estimate fixed and random effect parameters. |
| AVERAGEIFS | =AVERAGEIFS(B:B,A:A,PatientID) | Calculate subject-level summaries during exploratory longitudinal analyses. |
VBA (Optional)
A VBA routine can organise repeated-measures datasets, estimate simplified mixed-model parameters through external routines and generate longitudinal model summary reports.
Sources
- Laird NM, Ware JH. Random-Effects Models for Longitudinal Data. Biometrics. 1982;38(4):963?974.
- Pinheiro JC, Bates DM. Mixed-Effects Models in S and S-PLUS. Springer.
- Verbeke G, Molenberghs G. Linear Mixed Models for Longitudinal Data. Springer.
- Fitzmaurice GM, Laird NM, Ware JH. Applied Longitudinal Analysis. Wiley.
- Briggs A, Claxton K, Sculpher M. Decision Modelling for Health Economic Evaluation. Oxford University Press.
- ISPOR Good Practice Reports.
Related Concepts (2)
Library
Publications
1
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.
BookView source →
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: 18 Dec 2025
Content version: 1.0.0
Canonical Identity
- Persistent URI
- https://healtheconomics.wiki/concept/mixed-effects-model
- Term code
- HE-ES-SA-124
Stable URI · Machine-readable · Resolvable · CC BY 4.0