Understanding how health interventions or exposures produce their effects using mediation analysis

Mediation analysis is a method that quantifies how health exposures, such as medical interventions, change patient outcomes. Evidence that is generated from mediation analyses is important for intervention development and clinical and policy decision making. Mediation analysis has many applications that require specific and careful consideration for design, conduct, analysis, and interpretation. This article outlines motivations, effect types, causal assumptions, estimation, and reporting guidance for mediation analysis studies that aim to improve their conduct, interpretation, and implementation.

The reasons that health exposures, such as medical interventions, change patient outcomes are often poorly understood. Health exposures change patient outcomes through biological, psychological, and social mediators. Generally, a mediator is a variable that lies on the causal path between an exposure and an outcome. The causal role of a mediator can be communicated through a directed acyclic graph,1 which visually represents the direction of causal effects from exposures to outcomes and distinguishes between other variables such as confounders and colliders2 (fig 1). In health research, identifying mediators has the potential to inform theory, optimise interventions, and facilitate the implementation of policies and interventions in clinical and public health practice.3 The value of identifying the mediators of health interventions has been noted by the UK National Institute for Health and Care Research and the US National Institutes of Health.45 The mediators of health exposures in randomised trials and observational studies can be quantified using mediation analysis.67

Fig 1

A directed acyclic graph visually representing causal effects and variables relevant to mediation analysis. A causal path in a directed acyclic graph is represented by a sequence of variables connected by arrows. Figure shows a causal path from the exposure to outcome, and from the exposure to outcome through the mediator. This directed path follows the arrow direction from cause to effect. Figure also includes non-directed paths through the confounder and collider variables. Mediation analysis requires adjusting or controlling for confounders to reduce bias, and to avoid controlling for colliders, which typically introduces selection bias

In this article we provide an introduction for clinicians on key elements when conducting meditation analysis in trials and observational studies. We describe five steps to identify mediators of health exposures using mediation analysis: common motivations, effect types, causal assumptions, estimation, and reporting (fig 2). Detailed technical guidance is available elsewhere.891011Box 1 provides a glossary of common terms used in mediation analysis studies.

Fig 2

Steps in conducting mediation analysis in randomised trials and observational studies

Glossary of common terms used in mediation analysis studies (adapted from Lee et al 202111)

More detailed discussions of these terms are available elsewhere67

Summary points

Case study: Causal mediation analysis of the systolic blood pressure intervention trial

We will illustrate each step for conducting meditation analysis with an example12 which used data collected in the systolic blood pressure intervention trial (SPRINT).13 Briefly, SPRINT was a randomised clinical trial of 9361 participants in the US with high systolic blood pressure and increased cardiovascular risk, randomised to either intensive (target systolic blood pressure 120 mm Hg) or standard (140 mm Hg) antihypertensive drug treatment. The findings from this mediation analysis study contributed important evidence to the management of blood pressure.

Step 1: define the question

Mediation analysis is a flexible method that can be applied to randomised trials and observational studies to answer questions about how health exposures, such as medical interventions, affect an outcome. Some common research questions that can be answered by mediation analysis are described below.

Randomised trials

Mediation analysis can extend randomised trials beyond estimating the effects of interventions on health outcomes.1415 Mediation analysis can be used to help understand how an intervention causes (or does not cause) a change in a patient outcome. For example, Freeman et al16 found that about half of the total effect of cognitive behavioural therapy on psychotic experiences was mediated by early changes in sleep quality.

Mediation analysis in trials can be used to help adapt and refine interventions to improve their effectiveness. Mediation analysis is particularly relevant for complex interventions that comprise several components.3 Here, identifying the mechanisms responsible for producing the largest change in the outcome can inform the composition of complex interventions, and help efficient translation of interventions into practice. Mediation analyses can also be useful to understand why a particular intervention might have failed to produce effects. An intervention might not be effective because it did not change the mediator, or because the mediator did not influence the outcome as hypothesised. Mediation analysis can generate explanatory evidence beyond the standard exposure-outcome effect. Finally, in some situations, mediation analysis can be used in trials to estimate the direct effect (box 1) of an intervention on an outcome. In this setting, researchers might want to isolate an intervention effect that is not mediated through a variable on the causal pathway (eg, an unintended co-intervention during planned routine cardiac surgery1718).

Observational studies

A common reason for using mediation analysis in observational studies is to develop, test, or refine theory. For example, mediation analysis can be used to understand disease development or progression (eg, the development of breast cancer19) or identify targets for interventions (eg, treatment targets to reduce increased midlife arterial stiffness20). Furthermore, mediation analysis can be applied to observational studies to investigate the direct effects of an exposure on an outcome. For example, in the setting of correcting health and social disparities, mediation analysis can be used to investigate the effect of ethnicity (exposure) on mortality (outcome), if the effects through healthcare access (mediator) were removed.21 The various motivations for mediation analysis given in the previous section on randomised trials are also applicable to observational studies if the exposure is a well defined intervention.

Case study

The aim was to understand how intensive blood pressure treatment can lead to cardiovascular outcomes. Specifically, the authors used mediation analysis to investigate whether the effect of intensive versus standard treatment on cardiovascular outcomes was mediated by a potentially harmful indirect effect through low diastolic blood pressure (

Step 2: define the effects of interest for the mediation analysis

Mediation analyses aim to assess the relative magnitude of the causal pathways and mechanisms by which a health exposure, such as medical intervention, can affect an outcome.8 This assessment is achieved by decomposing the total effect of an exposure on an outcome into two types of effects: the direct effect and the indirect effect (fig 3). The direct effect is the exposure’s effect on the outcome while blocking the effect through the mediator, whereas the indirect effect is the exposure’s effect on the outcome that goes through the mediator. When the exposure and mediator interact, the total effect can be further decomposed into additional effect components depending on how the interaction is accounted for (eg, three way decomposition that includes a direct effect, an indirect effect, and a mediated interaction effect22).

Fig 3

Mediation analyses effects

Several different versions of direct and indirect effects exist, which can be broadly grouped into two perspectives: explanatory or interventional (see supplementary appendix).9 The controlled direct effect is a commonly reported version of the direct effect, which is the direct effect on the outcome while holding the mediator value constant (eg, a value of clinical or policy relevance). In this way, the controlled direct effect can help investigate how to adapt and optimise interventions,23 or how to deal with health and social disparities by potentially intervening on the mediator.2425 The research question (step 1) should drive the selection of mediation effects to be estimated.

Case study

The authors aimed to separate the total effect on cardiovascular outcomes of intensive treatment compared with standard treatment into a direct effect, blocking the effect through diastolic blood pressure; and an indirect (and potentially harmful) effect through intervention induced reductions in diastolic blood pressure.

Step 3: causal assumptions and measurement

Mediation analyses require causal assumptions to allow mediation estimates to be interpreted as causal effects. Consideration should also be given to which data to collect (exposure, mediator, outcome, and confounders), when the data should be collected (temporal order), and how the data should be collected (measurement and classification) to minimise bias in mediation analyses.

All mediation analyses require strong assumptions to draw valid causal inferences about direct and indirect effects. Firstly, these analyses require control for exposure-outcome, mediator-outcome, and exposure-mediator confounding. The study design and data source have important implications on the assumptions required for estimating direct and indirect effects in mediation analyses (eg, no unmeasured confounding). For example, in most randomised trials, it can generally be assumed that the exposure-mediator and exposure-outcome effects are unconfounded because of random allocation of participants to treatment groups. This is not the case for observational designs, and researchers are required to identify, collect, and adjust for all potential exposure-mediator and exposure-outcome confounders. All mediation analyses require consideration of mediator-outcome confounding, including possible mediator-outcome confounders that are affected by the exposure.8 Readers can easily assess the assumed causal associations when authors include a directed acyclic graph.2627 Design variations within observational studies, such as case-control and cohort designs, can also require different analytical approaches and additional assumptions.28 Mediation analysis, as with any causal analysis, requires that the exposure and mediators are well defined (consistency assumption),29 as well as a non-zero probability for any participant to be assigned to any level of the exposure and to present with any level of the mediator (positivity assumption).30

When and how the exposure, mediator, outcome, and potential confounding variables are measured has important implications on the validity of mediation analysis findings. The temporal precedence of the variables in a mediation analysis is important for assessing the direction of the hypothesised causal associations and the possibility of reverse causation. Temporal precedence requires the exposure to precede the mediator, which should precede the outcome. This precedence is often achieved with a longitudinal design, where each exposure is measured before mediator and mediator is measured before the outcome.31 As with all randomised trials and observational studies, measurement error or misclassification can lead to bias in the estimated effects, including the direct and indirect effects from mediation analysis.832

Case study

The authors included a directed acyclic graph to transparently display the assumed causal model (fig 4). The authors assumed no unmeasured confounding of the exposure-mediator and the exposure-outcome effects owing to random allocation of participants, and no confounding of mediator-outcome effects owing to adjustment of potential confounders (eg, age, sex, race, lifestyle characteristics). Finally, to ensure temporal ordering of the variables, the authors conducted the analysis on a restricted subset of participants (n=8301) who were still at risk for the primary outcome one year after randomisation, and who did not have missing blood pressure measurements at that time.

Fig 4

Directed acyclic graph of the assumed causal effects between intensive and standard antihypertensive treatment on cardiovascular outcomes through the potential mediator low diastolic blood pressure. Exposure-mediator effect represented by the purple arrow from the treatment to the mediator. Mediator-outcome effect represented by the purple arrow from the mediator to the outcome. Potential confounders of the mediator-outcome effect represented by the green arrows. Direct effect represented by the purple arrow from the treatment to the outcome and indirect effect represented by the purple arrows from the treatment to the outcome through the mediator

Step 4: estimate direct and indirect effects

Valid causal interpretations of mediation effects require that all potential exposure-mediator, exposure-outcome, and mediator-outcome confounders (identified and measured in step 3) are controlled by design or analysis.33 Several approaches are used to adjust for confounders in the analysis—including standard regression adjustment, where confounders are included as covariates in the statistical model—as well as more contemporary methods (including inverse probability weighting and sequential g estimation).33 In contrast with direct and indirect effects, the controlled direct effect can still be estimated when mediator-outcome confounders, including mediator-outcome confounders affected by the exposure, have not been accounted for by design or analysis.

Sensitivity analyses are used to assess the robustness of mediation analyses to statistical and causal assumptions. Statistical assumptions inherent to the chosen modelling procedures should be verified—for example, assessing how well the selected model fits the observed data by using residual plots. Unlike statistical assumptions, most causal assumptions cannot be empirically verified, so sensitivity analyses are used instead. For example, sensitivity analysis can be used to explore the assumption of no unmeasured mediator-outcome confounding, by assessing how strongly an unmeasured or unknown confounder would need to be related to both the mediator and the outcome to substantially change conclusions about the direct and indirect effects.34 Several sensitivity analysis techniques to explore causal assumptions for mediation analysis (eg, no unmeasured confounding, measurement error, or misclassification) are available.6 A mediation analogue to the E value unmeasured confounder assessment is straightforward and does not require specialist software.3435

Broadly, the two major techniques for conducting mediation analyses are traditional and causal approaches (fig 5). Traditional approaches encompass those from the causal steps of Baron and Kenny, and product and difference-of-coefficients framework,36 whereas causal approaches are from the counterfactual based framework (fig 5).637 Both approaches produce the same effect estimates when linear models are used,838 but not in the presence of non-linearities or to exposure-mediation interactions.839

Fig 5

Traditional versus causal mediation analysis approaches

The approaches differ in how they define and estimate the total, direct, and indirect effects. Traditional approaches define and estimate effects based on the regression coefficients from a series of regression models (model based).7 In contrast, causal approaches separate the definition of effects from the method of estimation (model free).6 Causal approaches define effects using the counterfactual framework, before estimating these effects using statistical methods such as regression or simulation.4041 Causal approaches are usually preferred because they can accommodate more realistic settings (eg, non-linear relations) and make causal assumptions explicit.642

In both traditional and causal approaches, most mediation analyses use regression to model the mediator and outcome. Depending on the type of mediator and outcome variables, the investigators select the most appropriate regression model—for example, Cox regression for time-to-event mediators, and outcomes or logistic regression for binary mediators and outcomes. In addition to including potential confounders and possible baseline measures of the mediator and outcome in the mediator and outcome models,43 investigators can also include a exposure-mediator interaction to better represent the presumed association and to improve model flexibility.6 Considering that the traditional and casual approaches for mediation analysis provide different direct and indirect effect estimates in the presence of interactions or non-linear models, ensuring that the approach aligns with the research question is important. Several statistical analysis software programs are available to conduct causal mediation analysis across common software packages, including R,444546 SAS,4748 Stata,4950 and Mplus.51

Multiple mediators

Mediation analysis can also be used in settings where health exposures are thought to change patient outcomes through multiple potential mechanisms or causal pathways. For example, Lu et al used mediation analysis to investigate the effect of body mass index on coronary heart disease and stroke, considering the possible mediators blood pressure, cholesterol, and glucose.52 A common but naive approach to investigate multiple mediators is to consider each potential mediator one at a time, and then add the indirect effects or proportion mediated across mediators. This approach assumes that the mediators are independent (ie, do not affect each other), and can also be complicated by mediator-outcome and mediator-mediator interactions.8 Methods have been developed to investigate multiple mediators by considering all potential mediators simultaneously in a single model and estimating a combined, “joint” indirect and direct effect.53 These joint effects can be estimated in the presence of potential exposure-mediator interactions as well as, to a certain extent, mediator-mediator interactions.53 This joint effect approach can also be used when the causal ordering of mediators is known to allow certain path specific effects to be estimated.53 Several programs are available to estimate joint effects when mediation analyses contain multiple mediators.4546

Case study

The authors used a causal approach for mediation analysis to estimate natural effect models.54 Firstly, the authors investigated the exposure-mediator effect fitting a binomial regression model for diastolic blood pressure including the treatment assignment. Secondly, the authors investigated the mediator-outcome effect fitting a Cox regression model for cardiovascular events, including the treatment assignment and diastolic blood pressure. To estimate direct and indirect effects, the authors used the method suggested by Lange et al,54 where direct and indirect effects can be extracted from the outcome model (Cox regression model for this analysis) fitted to an augmented dataset, where weights are assigned using a model for the mediator. Further details on natural effect models, including associated statistical software applications in R, are available.45 The authors did not conduct sensitivity analysis to assess causal assumptions (no unmeasured mediator-outcome confounding assumption), but instead estimated the direct and indirect effects, including different sets of potential mediator-outcome confounders.

Step 5: interpret and report mediation analysis results

Recent systematic reviews have shown that the reporting of mediation analysis studies is varied and often incomplete, and have highlighted the need for specific reporting guidance.5556 AGReMA (a guideline for reporting mediation analyses)11 was developed using the EQUATOR (enhancing quality and transparency of health research) framework for developing reporting guidelines,57 to provide recommendations for studies reporting mediation analyses. Through this minimum set of recommendations, the AGReMA statement aims to improve the completeness, consistency, and accuracy in reporting of mediation analyses. The 25 item statement is provided in table 1. The scope of AGReMA covers primary and secondary mediation analyses of randomised trials and observational studies, and it is intended to be general, so that it can guide the reporting of most mediation analyses. The AGReMA checklists are downloadable (agrema-statement.org ) and are indexed on the EQUATOR network website.

The 25 item AGReMA checklist