VerifiedEvidence: highv1.0.0

Mediation Analysis

A statistical approach examining whether an exposure's effect on an outcome operates through an intermediate variable, called a mediator, rather than directly.

Last reviewedDarrin Baines IP Ltd

Concept Architecture

Concept


Theoretically, Mediation Analysis is a statistical method used to investigate whether the effect of an exposure or intervention on an outcome is transmitted through an intermediate variable, known as a mediator. It decomposes the total effect into direct and indirect components, allowing researchers to examine the mechanisms through which causal relationships operate. Mediation analysis is founded on causal inference, path analysis and structural equation modelling, and is widely used to understand how interventions influence health outcomes.

Mathematically, mediation analysis is represented using a system of regression equations that estimate the relationships between the exposure, mediator and outcome. The indirect effect is quantified as the product of the regression coefficients linking the exposure to the mediator and the mediator to the outcome, while the direct effect represents the remaining effect of the exposure after accounting for the mediator. Modern approaches estimate direct and indirect effects using counterfactual frameworks and bootstrap confidence intervals.

In practice, mediation analysis is implemented using regression models, structural equation models or causal mediation models. In health economics, it is used to investigate whether interventions reduce healthcare costs through improved adherence, whether quality of life mediates treatment effects on productivity, or whether behavioural changes explain improvements in health outcomes. Appropriate interpretation requires assumptions regarding confounding, temporal ordering and causal structure.

Purpose


Used to decompose total effects into direct and indirect pathways, identify mechanisms underlying treatment effects and evaluate causal processes in health economic and health outcomes research.


Mathematical Formulae

Primary Formula

Total effect:

c = c? + ab

where:

  • a = effect of exposure on mediator
  • b = effect of mediator on outcome, adjusted for exposure
  • c = total effect of exposure on outcome
  • c? = direct effect of exposure on outcome
  • ab = indirect (mediated) effect

Supporting Formulae

Mediator model:

M = � + aX + �?

Outcome model:

Y = ? + c?X + bM + �?

Proportion mediated:

PM = (ab) / c

Related Mathematical Methods

  • Path Analysis
  • Structural Equation Modelling
  • Causal Mediation Analysis
  • Bootstrap Confidence Intervals
  • Sobel Test
  • Counterfactual Mediation Analysis
  • Baron?Kenny Mediation Framework

Example

A health economist evaluates whether a diabetes management programme reduces annual healthcare costs by improving medication adherence.

Estimated regression coefficients are:

  • Effect of programme on adherence: a = 0.60
  • Effect of adherence on annual costs (adjusted for treatment): b = ?�850
  • Total programme effect on annual costs: c = ?�900

The indirect effect is:

ab = 0.60 ? (?850)

ab = ?�510

The direct effect is:

c? = ?900 ? (?510)

c? = ?�390

The results suggest that approximately �510 of the programme's average �900 reduction in annual healthcare costs is mediated through improved medication adherence.


Excel Implementation

FunctionExample FormulaHealth Economics Application
LINEST=LINEST(B2:B501,C2:C501,TRUE,TRUE)Estimate regression coefficients for mediation models.
PRODUCT=B1*C1Calculate the indirect effect (a ? b).
SUM=D1+E1Combine direct and indirect effects to obtain the total effect.
SolverMaximise the likelihood or minimise residual error when estimating mediation models.Estimate mediation parameters.
IF=IF(F1<0.05,"Significant","Not Significant")Interpret mediation significance using p-values or bootstrap results.

VBA (Optional)

A VBA routine can automate estimation of mediation models, calculate direct and indirect effects and generate bootstrap confidence intervals for mediation analyses.


Sources

  • Baron RM, Kenny DA. The Moderator?Mediator Variable Distinction in Social Psychological Research. Journal of Personality and Social Psychology. 1986;51(6):1173?1182.
  • MacKinnon DP. Introduction to Statistical Mediation Analysis. Routledge.
  • VanderWeele TJ. Explanation in Causal Inference: Methods for Mediation and Interaction. Oxford University Press.
  • Hayes AF. Introduction to Mediation, Moderation, and Conditional Process Analysis. Guilford Press.
  • Pearl J. Direct and Indirect Effects. Proceedings of the Seventeenth Conference on Uncertainty in Artificial Intelligence. 2001.
  • Briggs A, Claxton K, Sculpher M. Decision Modelling for Health Economic Evaluation. Oxford University Press.

Library

Publications

1
  • Book

    Bayesian Methods in Health Economics — Gianluca Baio, 1st Edition ed., 2012 (Chapman & Hall / CRC Press)

    An overview of Bayesian statistical methods for the analysis of health economic data, covering economic evaluation concepts, statistical cost-effectiveness analysis, Bayesian computation and MCMC, and applied health economic evaluation.

Frequently Asked Questions (6)

  • What is mediation analysis?

    A statistical approach examining whether an exposure's effect on an outcome operates through an intermediate variable, called a mediator, rather than directly.

    Source: Baron & Kenny 1986

  • What pathway does mediation analysis try to uncover?

    Mediation analysis tries to uncover the pathway by which an exposure affects an outcome, asking whether it works through an intermediate variable, the mediator, rather than acting directly. It separates the total effect into an indirect part that flows through the mediator and a direct part that does not, showing how much of the effect a proposed mechanism explains. This helps reveal why a treatment works, rather than merely that it works, which can guide how to strengthen or replace it. Tracing the mechanism behind an effect is its purpose. VanderWeele (2015) describes this approach.

    Source: VanderWeele 2015

  • How does mediation analysis work?

    Mediation analysis works by examining the relationships among the exposure, the mediator, and the outcome: the exposure's effect on the mediator, the mediator's effect on the outcome, and the exposure's effect on the outcome with and without accounting for the mediator. The indirect effect through the mediator and the direct effect are then estimated. So mediation analysis works by modelling how the exposure relates to the mediator and how both relate to the outcome, decomposing the total effect into indirect and direct components, which reveals how much of the exposure's effect is transmitted through the mediator, using traditional regression approaches or more modern causal mediation methods.

    Source: Baron & Kenny 1986

  • What are direct and indirect effects in mediation?

    In mediation, the indirect effect is the part of the exposure's effect on the outcome that operates through the mediator, while the direct effect is the part that does not go through the mediator, and together they make up the total effect. The indirect effect reflects the mechanism captured by the mediator. So direct and indirect effects distinguish the pathways of an exposure's influence, with the indirect effect quantifying how much works through the mediator and the direct effect how much acts through other paths, and estimating both shows the extent to which the mediator explains the exposure's effect on the outcome.

    Source: Baron & Kenny 1986

  • What are the assumptions of mediation analysis?

    The assumptions of mediation analysis, particularly for causal interpretation, include no unmeasured confounding of the exposure-outcome, exposure-mediator, and mediator-outcome relationships, correct specification of the models, and correct temporal ordering, with the exposure preceding the mediator and the mediator the outcome. These are strong and often untestable. So mediation analysis rests on demanding assumptions, especially about confounding of the mediator-outcome relationship, which is easily overlooked, and its causal conclusions are only as sound as these assumptions, which is why modern causal mediation methods make the assumptions explicit and sensitivity analyses are used, since violated assumptions can invalidate the decomposition into direct and indirect effects.

    Source: Hernán & Robins 2020

  • Why is mediation analysis useful?

    Mediation analysis is useful because it helps explain the mechanism by which an exposure affects an outcome, showing whether and how much the effect operates through a hypothesised intermediate variable, which informs understanding and intervention. So mediation analysis is useful for uncovering pathways and mechanisms, since knowing that an effect works through a particular mediator can suggest where to intervene and clarify why an exposure has its effect, which is valuable in research on causes and interventions, though its conclusions depend on strong assumptions, so it is applied and interpreted carefully, ideally within a causal framework that makes those assumptions explicit.

    Source: Baron & Kenny 1986

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

Term code
HE-ES-SA-116

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