Statistical Methods Atlas
Atlas › Predict & Explain › Mediation Analysis

Mediation Analysis

Tests whether X influences Y through an intermediate variable M — e.g., transformational leadership → psychological empowerment → job performance.

Predict & ExplainMultivariate also known as: Indirect effect analysis, Process analysis

✓ When to use

  • Theory proposes a mechanism: X affects M, and M in turn affects Y.
  • 'Why/how does it work?' questions that turn a correlation into a process story.
  • Ideally with temporal separation: X measured before M, M before Y.

✗ When NOT to use

  • Cross-sectional data where M and Y are simultaneous self-reports — the indirect 'effect' is then a correlational decomposition, not evidence of mechanism; label conclusions accordingly.
  • The third variable conditions rather than transmits the effect — that is moderation.
  • M measured with poor reliability — attenuates the a and b paths multiplicatively.
  • Reverse causality between M and Y is plausible and undesigned-for.

Data requirements

Dependent / outcome variableContinuous outcome Y (binary Y possible with logistic extensions).
Independent / grouping variablePredictor X, mediator M (continuous), optional covariates.
DesignPreferably longitudinal or experimental (manipulate X); cross-sectional possible but interpretively weak.
Sample size guidanceBootstrap tests need N ≥ 100–200 for typical effects; small indirect effects need far more.

Assumptions

Hypotheses

H₀ — The indirect effect is zero (a×b = 0).
H₁ — The indirect effect differs from zero (X affects Y through M).

The concept

Two regressions estimate the machinery: path a (X→M) and path b (M→Y controlling X); the indirect effect is a×b, and the direct effect c′ is X→Y controlling M. Total effect c = c′ + a×b. Modern practice tests a×b directly with a bootstrap confidence interval (the product's distribution is skewed, so normal-theory Sobel tests are outdated).

The old Baron–Kenny requirement that the total effect must be significant first is obsolete — suppression can hide real indirect effects. Language matters: with cross-sectional data, report 'indirect association consistent with mediation', reserving causal claims for designs that earn them. 'Full vs partial mediation' labels are increasingly discouraged; report the effect sizes instead.

Worked example

Does psychological empowerment (M) transmit the effect of transformational leadership (X) on performance (Y)? N = 310, three-wave survey.

Result: a = 0.51 (p < .001), b = 0.34 (p < .001); indirect effect a×b = 0.17, 95% bootstrap CI [0.10, 0.26] (5,000 resamples); direct c′ = 0.12 (p = .04). The leadership–performance link operates substantially through empowerment.

How to run it

library(mediation)
med <- lm(empower ~ leadership, data = df)
out <- lm(performance ~ leadership + empower, data = df)
res <- mediate(med, out, treat = "leadership", mediator = "empower",
               boot = TRUE, sims = 5000)
summary(res)   # ACME = indirect, ADE = direct, Total

# alternative: lavaan SEM with ab := a*b and bootstrapped CI

Interpreting the output

APA-style reporting

The indirect effect of transformational leadership on performance through psychological empowerment was significant, ab = 0.17, 95% bootstrap CI [0.10, 0.26] (5,000 resamples). The direct effect remained significant, c′ = 0.12, p = .041, indicating that empowerment accounted for a substantial share of the total effect (c = 0.29).

Common mistakes

Related methods

Moderation AnalysisConditioning instead of transmittingMultiple Linear RegressionThe building-block equationsStructural Equation Modeling (SEM)Latent-variable mediationPartial CorrelationSimpler control logic
← Moderation AnalysisBinary Logistic Regression →