Concept Architecture
Concept
Theoretically, Random Effects are model components that represent variability arising from sampled groups, clusters, subjects, or higher-level units, where the observed levels are considered a random sample from a larger population. Random effects account for correlation among observations within the same group while allowing inference to extend beyond the specific groups included in the study. They are fundamental to mixed-effects modelling, hierarchical modelling, longitudinal analysis, and multilevel statistical inference.
Mathematically, random effects are incorporated into regression models as random variables with specified probability distributions, most commonly assuming a Normal distribution with mean zero and an estimable variance. The inclusion of random effects partitions total variability into between-group and within-group components while preserving fixed effects that estimate population-average relationships. Parameters are typically estimated using maximum likelihood or restricted maximum likelihood (REML).
In practice, random effects are estimated in mixed-effects models using specialised statistical software. In health economics they are widely used to analyse clustered clinical trials, repeated measures, longitudinal patient outcomes, multicentre studies, hospital-level variation, physician effects, and hierarchical healthcare data where observations within clusters are correlated.
Purpose
Used to model unexplained variation between clusters or subjects, account for correlated observations, partition variance across hierarchical levels, and improve estimation in multilevel and longitudinal health economic analyses.
Mathematical Formulae
Primary Formula
y = X? + Zu + �
where:
- y = response vector
- X? = fixed effects
- Zu = random effects
- u ~ N(0, G)
- � ~ N(0, R)
Supporting Formulae
Random effects distribution:
u ~ N(0, �?�)
Residual distribution:
� ~ N(0, ��)
Variance decomposition:
Var(y) = ZGZ? + R
Intraclass Correlation Coefficient:
ICC = �?� � (�?� + ��)
Related Mathematical Methods
- Mixed Effects Model
- Linear Mixed Model
- Generalised Linear Mixed Model
- Restricted Maximum Likelihood
- Maximum Likelihood Estimation
- Hierarchical Model
- Multilevel Model
- Intraclass Correlation
- Variance Components Analysis
Example
A health economist evaluates annual healthcare costs for patients treated across 40 hospitals.
The fitted mixed-effects model is:
Cost = ?? + ??(Treatment) + Hospital Random Effect + Residual Error
Estimated variance components are:
Hospital variance:
�?� = 1.20
Residual variance:
�� = 4.80
The intraclass correlation coefficient is:
ICC = 1.20 � (1.20 + 4.80)
= 0.20
This indicates that 20% of the variation in healthcare costs is attributable to differences between hospitals, while the remaining 80% arises from differences between individual patients within hospitals.
Excel Implementation
| Function | Example Formula | Health Economics Application |
|---|---|---|
| AVERAGE | =AVERAGE(B2:B101) | Calculate group-level mean outcomes before mixed-model analysis. |
| VAR.S | =VAR.S(B2:B101) | Estimate within-group or between-group variance components for exploratory analysis. |
| SUMPRODUCT | =SUMPRODUCT(GroupWeights,GroupMeans) | Calculate weighted group summaries prior to mixed modelling. |
| MMULT | =MMULT(Matrix1,Matrix2) | Support matrix calculations related to variance component estimation. |
| TRANSPOSE | =TRANSPOSE(MatrixRange) | Support matrix operations used in mixed-model calculations. |
VBA (Optional)
Automate preparation of clustered datasets, calculate exploratory variance components, and generate summary reports for mixed-effects modelling.
Sources
- Laird NM, Ware JH. Random-Effects Models for Longitudinal Data. Biometrics. 1982.
- Pinheiro JC, Bates DM. Mixed-Effects Models in S and S-PLUS.
- Fitzmaurice GM, Laird NM, Ware JH. Applied Longitudinal Analysis.
- Verbeke G, Molenberghs G. Linear Mixed Models for Longitudinal Data.
- Briggs A, Claxton K, Sculpher M. Decision Modelling for Health Economic Evaluation.
- Drummond MF, et al. Methods for the Economic Evaluation of Health Care Programmes.
- NICE Health Technology Evaluation Manual.
- 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 are random effects?
In a mixed effects model, the components representing how individual units, such as patients, vary around an overall average relationship.
Source: Laird & Ware 1982
What do random effects represent in a mixed model?
In a mixed effects model, random effects represent how individual units, such as patients or hospitals, vary around the overall average relationship. Rather than estimating a separate parameter for every unit, they treat those units as drawn from a wider population and estimate how much they spread around the common pattern. A random intercept lets each unit have its own baseline, and a random slope lets the effect of a predictor differ between units. Capturing unit-to-unit variation around the average is what they do. Kirkwood and Sterne (2003) describe these.
Source: Kirkwood & Sterne 2003
How do random effects differ from fixed effects?
Random effects represent variation between units, treated as drawn from a distribution, and capture the correlation of observations within units, while fixed effects represent average relationships assumed constant across the population. Fixed effects are the main effects of interest, and random effects the variability around them. So random and fixed effects differ in that fixed effects estimate population-level relationships and random effects model between-unit variation and within-unit correlation, and a mixed effects model combines both, using fixed effects for average patterns and random effects for how individuals or groups deviate from those patterns, which allows nested and repeated data to be analysed validly.
Source: Laird & Ware 1982
Why are random effects used?
Random effects are used to account for the correlation of observations within units in nested or repeated data, which would otherwise violate the independence assumption of standard methods, and to estimate the variation between units and borrow strength across them. So random effects are used to handle the structure of hierarchical and longitudinal data, since modelling the between-unit variation gives valid standard errors and reveals how much outcomes vary between units, and it stabilises estimates for units with little data by sharing information, which is why random effects are central to mixed and multilevel models for clustered and repeated-measures data.
Source: Laird & Ware 1982
What do random effects represent?
Random effects represent the deviations of individual units from the overall average, such as each hospital's or patient's departure from the population-level relationship, modelled as coming from a distribution with an estimated variance. So random effects represent the between-unit variability and, through it, the correlation of observations within units, capturing how much and in what way units differ, and their estimated variance quantifies the extent of this variation, which is informative in itself, showing, for example, how much outcomes vary between hospitals, and which distinguishes a mixed model from one assuming all units share the same relationship.
Source: Laird & Ware 1982
What is the difference between random intercepts and random slopes?
A random intercept allows each unit to have its own baseline level of the outcome, capturing variation in the average outcome between units, while a random slope allows the effect of a predictor to vary between units, capturing variation in relationships across units. So random intercepts and random slopes are two kinds of random effects, with random intercepts modelling differing baselines and random slopes differing effects, and including them lets a mixed model represent both varying levels and varying relationships between units, giving a flexible account of how nested or repeated data vary, according to which aspects are expected to differ across units.
Source: Laird & Ware 1982
Trust Record
Verified by Dr Darrin Baines
British health economist
Professional identity: darrinbaines.org
Verification date: 23 Dec 2025
Content version: 1.0.0
Canonical Identity
- Persistent URI
- https://healtheconomics.wiki/concept/random-effects
- Term code
- HE-ES-SA-172
Stable URI · Machine-readable · Resolvable · CC BY 4.0