Mediation analysis tests how or why one variable affects another. Does a training programme (X) improve job performance (Y) because it increases self-efficacy (M)? If so, self-efficacy is a mediator, and the effect of training on performance that runs through it is the indirect effect.
This guide explains the modern, bootstrap-based approach to mediation that reviewers now expect, walks through a worked example, and shows how to report the result.
In this guide
The mediation model in one picture
A simple mediation model has three paths:
- a: the effect of X on M.
- b: the effect of M on Y, controlling for X.
- c′ (c-prime): the direct effect of X on Y, controlling for M.
The indirect effect is the product a × b. The total effect c is the sum of the direct and indirect effects: c = c′ + ab.
The indirect effect (ab) is the thing you are testing. Mediation is supported when the confidence interval for ab does not include zero, regardless of whether the total effect c is significant.
Why Baron and Kenny's causal steps are outdated
For decades, researchers followed Baron and Kenny (1986): show that X predicts Y, that X predicts M, and that M predicts Y controlling for X, then compare c and c′. Methodologists such as Hayes (2009) and Zhao, Lynch and Chen (2010) pointed out several problems:
- The method never directly tests the indirect effect.
- It requires a significant total effect, but mediation can exist without one (for example, when a positive indirect effect and a negative direct effect cancel out).
- It has low statistical power.
The Sobel test does test ab, but it assumes the indirect effect is normally distributed. It almost never is, because the product of two normal variables is skewed. So the Sobel test is also underpowered.
The modern approach: bootstrapped confidence intervals
Bootstrapping resamples your data with replacement thousands of times (5,000 is a common choice), re-estimates a × b in every resample, and uses the distribution of those estimates to build a confidence interval. It makes no assumption about the shape of the sampling distribution.
- If the 95% bootstrap CI for ab excludes zero, the indirect effect is significant.
- If it includes zero, there is no evidence of mediation.
This is the approach used by the PROCESS macro (Model 4 for simple mediation) and by the free mediation analysis calculator, which also handles parallel and serial mediators and covariates.
Assumptions
Mediation uses ordinary regression, so the usual regression assumptions apply: linear relationships, independent observations, no severe multicollinearity and no extreme outliers. In addition:
- Causal order. Mediation is a causal claim. With cross-sectional survey data, the statistics can be consistent with mediation, but they cannot prove the order X → M → Y. Ground the order in theory and, ideally, in the study design (experiments or time-lagged measures).
- Reliable measurement of M. Measurement error in the mediator biases b and the indirect effect. With multi-item scales, a structural equation model (CB-SEM or PLS-SEM) handles measurement error better.
Worked example
An HR researcher surveys 240 employees. X = participation in a leadership training programme (scale score), M = self-efficacy, Y = job performance. All variables are standardized, and 5,000 bootstrap samples are used.
| Path | Estimate | SE | 95% CI | p |
|---|---|---|---|---|
| a (X → M) | 0.42 | 0.06 | [0.30, 0.54] | < .001 |
| b (M → Y, controlling for X) | 0.35 | 0.07 | [0.21, 0.49] | < .001 |
| c′ direct effect (X → Y) | 0.18 | 0.07 | [0.04, 0.32] | .011 |
| c total effect (X → Y) | 0.33 | 0.06 | [0.21, 0.45] | < .001 |
| ab indirect effect | 0.15 | 0.03 | [0.09, 0.21] (bootstrap) | — |
Interpretation:
- Training is associated with higher self-efficacy (a = 0.42).
- Self-efficacy is associated with higher performance, holding training constant (b = 0.35).
- The indirect effect ab = 0.42 × 0.35 = 0.15, and its bootstrap CI [0.09, 0.21] excludes zero, so self-efficacy significantly mediates the effect of training on performance.
- The direct effect c′ = 0.18 is still significant, so part of the effect runs through other routes.
Types of mediation (Zhao, Lynch & Chen, 2010)
Rather than "full" and "partial" mediation, many journals now prefer this classification:
| Type | Indirect effect (ab) | Direct effect (c′) |
|---|---|---|
| Complementary mediation | Significant | Significant, same sign as ab |
| Competitive mediation | Significant | Significant, opposite sign to ab |
| Indirect-only mediation | Significant | Not significant |
| Direct-only (no mediation) | Not significant | Significant |
| No effect | Not significant | Not significant |
Our example is complementary mediation. Avoid writing "full mediation" just because c′ is not significant: a non-significant direct effect may simply reflect a small sample.
Beyond simple mediation
- Parallel mediation: two or more mediators side by side (X → M1 → Y and X → M2 → Y). You can compare the specific indirect effects with a contrast.
- Serial mediation: mediators in a chain (X → M1 → M2 → Y). Use the serial mediation tool.
- Moderated mediation: the indirect effect depends on a moderator W. Use the moderated mediation analysis or the PROCESS macro online tool, which reports the index of moderated mediation.
How to report a mediation analysis in APA 7
A mediation analysis with 5,000 bootstrap samples tested whether self-efficacy mediated the relationship between leadership training and job performance. Training was positively associated with self-efficacy, a = 0.42, 95% CI [0.30, 0.54], and self-efficacy was positively associated with performance controlling for training, b = 0.35, 95% CI [0.21, 0.49]. The indirect effect was significant, ab = 0.15, 95% bootstrap CI [0.09, 0.21]. The direct effect of training on performance remained significant, c′ = 0.18, 95% CI [0.04, 0.32], indicating complementary mediation.
Also include a path diagram with the coefficients (the calculator draws one you can export), state the number of bootstrap samples, and say whether the CIs are percentile or bias-corrected.
Frequently asked questions
Do I need a significant total effect to test mediation?
No. Modern approaches test the indirect effect directly. An indirect effect can be significant even when the total effect is not, for example when direct and indirect effects have opposite signs.
How many bootstrap samples should I use?
5,000 is the common default and is enough for stable 95% confidence intervals. Use 10,000 if your result is close to the boundary of significance.
Is the Sobel test still acceptable?
It is generally discouraged, because it assumes the indirect effect is normally distributed and has low power. Bootstrapped confidence intervals are the recommended approach.
What is the difference between mediation and moderation?
Mediation explains how or why X affects Y (through M). Moderation explains when or for whom the effect of X on Y changes (depending on W).
Can I run PROCESS Model 4 without SPSS?
Yes. The free mediation analysis calculator on FreeStatisticalTools.com runs the same type of model (simple, parallel and serial mediation with bootstrap CIs) in your browser. It is an independent implementation and is not affiliated with Andrew F. Hayes or the official PROCESS macro.