Causal Mediation (ACME + ADE)
VerifiedMediation (legacy hub)
Run this test straight away on a free built-in teaching dataset — no data of your own needed — or bring your own. Either opens the guided workspace: variable setup, assumption diagnostics, results with effect sizes and confidence intervals, figures, and APA-ready reporting.
Loading teaching datasets…
Or use your own dataset
Loading your datasets…
Estimates mediation in a modern causal framework — natural direct and indirect effects, allowing exposure–mediator interaction.
Causal mediation decomposes the total effect into natural direct and indirect effects under explicit assumptions (no unmeasured confounding), handling exposure × mediator interaction that classic Baron-Kenny can't.
Worked example
How much of a drug's effect on recovery works via inflammation?
Causal mediation decomposed the drug→recovery effect into natural direct and indirect (via inflammation) effects (n = 400, bootstrapped).
63% of the total effect was mediated by inflammation (natural indirect effect = 0.22, 95% CI [0.13, 0.31]).
Causal mediation showed inflammation mediated 63% of the drug's effect on recovery (NIE = 0.22, 95% CI [0.13, 0.31]).
Try it yourself: Load this ready-made sample and follow the run above.
When to use it
- You need a defensible causal claimThe counterfactual (NDE/NIE) decomposition rests on stated assumptions rather than the Baron-Kenny recipe.
- Exposure and mediator may interactThe effect of M on Y differs by level of X — something the classic product-of-coefficients approach cannot represent.
- You want a mediated proportionNIE / total effect gives the share of the effect explained by the mediator.
When NOT to — use instead
- A simple linear mechanism, no interactionIf X and M don't interact and Y is continuous, the classic approach is simpler and equivalent. → Simple mediation
Hypotheses
Parameter tested: the natural indirect and direct effects (NIE, NDE), which sum to the total effect and permit an exposure×mediator interaction
Assumptions (and what to do if they fail)
Check: Ideally X is randomised; otherwise every common cause of X and Y must be measured and adjusted.
If violated: Both NDE and NIE are biased.
Check: No omitted common cause of M and Y — not guaranteed even when X is randomised.
If violated: The NIE is biased; this is the assumption that most often fails in practice.
Check: X must not cause a confounder of the M–Y link.
If violated: The natural-effect decomposition is not identified; interventional effects are needed instead.
Check: The interaction and any non-linearity are specified as intended.
If violated: Mis-specification carries straight into the effect estimates.
Ready to run a Causal Mediation (ACME + ADE) on your own data?
Guided setup, automatic assumption checks, effect sizes, figures and an APA write-up.
Run this test →