Relate › Mediation / Moderation

Mediation analysis (X → M → Y)

Baron-Kenny mediation analysis splits the X → Y relationship into a direct path c′ and an indirect path X → M → Y, with a Sobel test and a bootstrap CI for the indirect effect ab.

What is Mediation analysis (X → M → Y)?

Mediation asks: does X affect Y partly because X affects an intermediate variable M? Baron-Kenny estimates four regressions to decompose the total effect c (X → Y) into a direct effect c' (X → Y holding M fixed) and an indirect effect a·b (X → M times M → Y, holding X fixed).

The Sobel test gives a parametric SE for ab via the delta method, but its assumption that ab is normally distributed is wrong (the product of two normals is not normal). The bootstrap CI we provide is more reliable — especially for smaller samples — because it makes no distributional assumption on the sampling distribution of ab.

Mediation is *causal* in interpretation — without random assignment of X and a defensible model for M's causal role, the estimates are descriptive only. Causal mediation analysis (Imai, VanderWeele) is a more rigorous framework when these assumptions matter.

When should I use Mediation analysis (X → M → Y)?

  • Mechanism testing: does treatment X work *because* it changes mediator M?
  • Decomposing a known total effect into mechanism-specific and residual parts.

What data does it need?

X (predictor) + M (mediator) + Y (outcome), all numeric.

What does it report?

Path coefficients a / b / c / c' with CIs, Sobel z + p, bootstrap percentile CI on ab, proportion mediated = ab / c.

What does it assume?

  • Independent observations.
  • Linearity in each path.
  • No unmeasured confounding of X → M, M → Y, or X → Y (the strong assumption).
  • Correct ordering: X precedes M precedes Y in time.

Formula

c = ab + c' (the total = indirect + direct decomposition)

How do I interpret the result?

Significant ab + non-significant c' ⇒ full mediation. Significant ab + significant c' ⇒ partial mediation. Non-significant ab ⇒ no mediation evidence.

"Proportion mediated" can exceed 100% or be negative when ab and c' have opposite signs (suppression) — interpret carefully.

See also

References

  • Baron & Kenny (1986). The moderator-mediator variable distinction in social psychological research. JPSP 51(6).