Mediation analysis
What question does this help answer?
It addresses mechanism: not whether something works, but by what route. That is a genuinely different question from the total effect, and it needs genuinely stronger assumptions.
When to use it
Use it when the total effect is already established or being estimated alongside, when a specific mediator is plausible on prior grounds, and when exposure, mediator and outcome are measured in that temporal order.
When not to use it
Avoid it when the mediator is measured at the same time as the outcome, when it could plausibly be a consequence of the outcome, or when the study was not designed with mediation in mind. A mediation analysis added to answer a reviewer is rarely supportable.
How it works in plain language
The effect is decomposed into an indirect part running through the mediator and a direct part that does not. Modern practice defines these with counterfactuals rather than by comparing regression coefficients, which lets the analysis handle exposure-mediator interaction and binary outcomes properly. The decomposition is only meaningful if there is no unmeasured confounding of THREE relationships: exposure-outcome, mediator-outcome, and exposure-mediator. The middle one is the assumption most often unexamined, and randomizing the exposure does nothing to secure it.
The relationships that must be free of confounding
Why Mallard may recommend it
Mallard may recommend mediation analysis when the question explicitly asks through what mechanism an effect operates, and when the data support the required temporal ordering.
Key assumptions and design requirements
- All three no-unmeasured-confounding assumptions are stated, including mediator-outcome, which randomization does not deliver.
- Temporal order is real: exposure, then mediator, then outcome.
- With a BINARY outcome, a counterfactual or g-computation framework is used. Baron-Kenny and product-of-coefficients are invalid there because the odds ratio is non-collapsible.
- Exposure-mediator interaction is allowed for rather than assumed absent.
- Power is assessed by simulation; mediation has no simple closed-form sizing.
- Sensitivity analysis for unmeasured mediator-outcome confounding is reported.
What to watch out for
Mediation needs no unmeasured confounding of exposure-outcome, mediator-outcome AND exposure-mediator relationships, which is far stronger than what the total effect required. With a binary outcome the product-of-coefficients and Baron-Kenny approaches are invalid because the odds ratio is non-collapsible; a counterfactual or g-computation framework is required.
Clinical example
Question: Does a care-coordination programme reduce readmission by improving medication adherence? Design: Measure the programme, then adherence, then readmission, and decompose the effect within a counterfactual framework because the outcome is binary, reporting a sensitivity analysis for unmeasured confounding between adherence and readmission.
- Mediation Analysis: A Practitioner's Guide (opens in a new tab) · Annu Rev Public Health · doi 10.1146/annurev-publhealth-032315-021402
- Tutorial on directed acyclic graphs (opens in a new tab) · J Clin Epidemiol · doi 10.1016/j.jclinepi.2021.08.001