- Introduced by
- Pearl (2001); general framework by Imai, Keele & Tingley (2010)
- Year
- 2010
- Type
- Counterfactual causal decomposition
What does it do?
Causal mediation analysis is a counterfactual framework that splits a treatment's total effect on an outcome into a Natural Direct Effect (NDE), which does not operate through a chosen mediator, and a Natural Indirect Effect (NIE), which does.
Pearl (2001) gave formal counterfactual definitions of direct and indirect effects, and Imai, Keele and Tingley (2010) developed a general approach covering definition, identification, estimation and sensitivity analysis without reference to any specific statistical model.
The intuition behind the method
Suppose a treatment changes an outcome partly directly and partly by first changing an intermediate variable, the mediator. Causal mediation asks two counterfactual questions. The first changes the treatment while holding the mediator at the value it takes under the reference treatment level; this gives the direct route (NDE). The second holds the treatment at the level of interest while the mediator moves from the value it takes under the reference level to the value it takes under the treatment level; this gives the route through the mediator (NIE). With the reference-level definitions used here, NDE + NIE equals the total effect, so the analysis shows how much of the treatment works directly and how much through the mediator. This reading is causally meaningful only if the identification assumptions hold.
History
Pearl (2001) gave formal counterfactual definitions of direct and indirect effects, distinguishing them from the older product-of-coefficients approach associated with Baron and Kenny. Imai, Keele and Tingley (2010) argued that causal mediation had been tied to linear structural equation models and proposed a general definition, identification, estimation and sensitivity analysis that does not depend on a specific statistical model. Their paper also offers software that implements the proposed methods.
When to use it
Choose causal mediation when the question is how much of a treatment's effect passes through a specific, theoretically justified mediator, not only whether the treatment has an effect. It rests on no-unmeasured-confounding assumptions: no confounding of the treatment-outcome, mediator-outcome and treatment-mediator relationships, plus a cross-world assumption linking the mediator under one treatment level with the outcome under another. The cross-world assumption cannot be checked with observed data, so the method is credible only when the study design makes these assumptions plausible. Roughly 100 or more observations is a rough planning figure; verify that your sample gives adequate precision. Do not use it when the mediator may itself be affected by the outcome, when temporal ordering of treatment, mediator and outcome is not established, or when mediator-outcome confounding cannot be argued away.
Limitations and considerations
- The indirect effect can be estimated imprecisely in small samples; precision depends on effect sizes and the mediator model, so check power for your own design.
- Identification rests on untestable assumptions, including the cross-world assumption, which cannot be verified from observed data. Imai et al. (2010) state the key identification assumption explicitly and propose sensitivity analysis to assess how robust conclusions are to its violation.
- If any of the confounding assumptions is violated, the NDE/NIE split no longer has its intended causal interpretation, and the reported components can be misleading.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Defines direct and indirect effects through counterfactual contrasts rather than as products of regression coefficients, so the quantities have an explicit causal meaning when the assumptions hold.
- Splits a total effect into a direct and an indirect component, which answers how much of the treatment works through the mediator.
- The treatment can be continuous, binary or categorical.
- The general framework is not tied to a particular statistical model, so it can accommodate nonlinear relationships and discrete mediators (Imai et al., 2010).
Applications
- Health research: decomposing how a treatment affects an outcome directly versus through a biological or behavioural mediator.
- Social and psychological science: testing how much of an intervention's effect is carried by an intermediate psychological process.
- Programme evaluation: separating the direct effect of a policy from the part that flows through an intermediate channel.
How it works
How it works
Two linked models are fitted: a mediator model for M given treatment T and covariates X, and an outcome model for Y given T, M and X. The linear equations shown in the mechanics are one illustrative parametric specialization; Imai et al. (2010) define and identify the effects without reference to any specific statistical model, so nonlinear and discrete-variable models can be used as well. The treatment can be continuous, binary or categorical. Roughly 100 observations is a rough planning figure used in this registry, not a published threshold; precision of the indirect effect depends on effect sizes, the mediator model and the design, so check power for your own study.
Formula
M = \alpha_0 + \alpha_1 T + \alpha_2 X + \epsilon_M, \quad Y = \beta_0 + \beta_1 T + \beta_2 M + \beta_3 X + \epsilon_Y
The natural effects are defined through counterfactual contrasts, so they are not the same as the individual regression coefficients. Counterfactual means are obtained by predicting the outcome from the outcome model at the treatment level of interest while the mediator is set to values drawn from (or predicted by) the mediator model under the reference or the treatment level, and then averaging over the covariate distribution. The NDE and NIE are differences of these averaged counterfactual means, and NDE + NIE equals the total effect. Estimation is commonly done by two-stage regression or inverse-probability weighting, with confidence intervals from a nonparametric bootstrap that resamples the data to reflect uncertainty in the estimated effects.
Formula
\text{NDE} = E[Y(t, M(t^{*}))] - E[Y(t^{*}, M(t^{*}))], \quad \text{NIE} = E[Y(t, M(t))] - E[Y(t, M(t^{*}))], \quad \text{TE} = \text{NDE} + \text{NIE}Common pitfalls
- Interpreting an unstable indirect effect from a small sample. Small samples limit precision, and the identification assumptions must be argued independently of sample size.
- Treating the cross-world assumption as testable. It cannot be checked from the data, so unmeasured mediator-outcome confounding can invalidate the NDE/NIE split without any warning in the output.
- Ignoring treatment-induced confounding: a covariate affected by the treatment that also affects the mediator and the outcome breaks the no-confounding assumptions, and standard regression adjustment will not remove the resulting bias.
- Reporting only point estimates. The natural effects are estimated with uncertainty, so bootstrap confidence intervals should accompany them.
Frequently asked questions
What is the difference between NDE and NIE?
The Natural Direct Effect (NDE) is the part of the treatment's effect that does not operate through the mediator, while the Natural Indirect Effect (NIE) is the part that does. With the reference-level definitions, TE = NDE + NIE.
What is the cross-world assumption?
It is the assumption that lets you compare an outcome under one treatment level while the mediator takes the value it would have had under a different treatment level. It cannot be tested from observed data, which is why the causal interpretation of mediation depends on untestable identification conditions.
How large a sample do I need?
There is no universal threshold. Roughly 100 observations is a rough planning figure used in this registry, but the precision of the NDE and NIE depends on effect sizes, the mediator model and the design, so assess power for your own study. Small samples limit precision, and the identification assumptions must be justified regardless of sample size.
How is this different from classical Baron-Kenny mediation?
Classical mediation multiplies regression coefficients and is tied to linear models. The causal approach defines direct and indirect effects through counterfactuals with explicit no-confounding assumptions, so the decomposition carries a causal meaning when those assumptions hold.
Related methods
Sources
Pearl, J. (2001). Direct and Indirect Effects. In Proceedings of the Seventeenth Conference on Uncertainty in Artificial Intelligence (UAI), 411-420.
Open publication referenceImai, K., Keele, L., & Tingley, D. (2010). A General Approach to Causal Mediation Analysis. Psychological Methods, 15(4), 309-334.
Open DOI referenceFundamentals of causal inference using R, p. ?