Written and maintained by CASRAI Editorial Board
Published · Last updated
On this page
To test mediation, estimate the indirect effect ab (the X→M path a times the M→Y path b, controlling for X) and judge it with a bootstrap confidence interval, preferably the percentile bootstrap with at least 5,000 resamples. Report all paths (a, b, c′, c) and state the causal assumptions you are making. The sections below cover why this is now the standard, how much data you need, and what reviewers expect in the write-up.
Mediation analysis tests whether the effect of a predictor (X) on an outcome (Y) operates, wholly or partly, through an intervening variable (M): the mechanism question, not just whether X and Y are related. For the separate question of whether a variable is a mediator or a moderator in the first place, see mediator vs. moderator. This page assumes you already have a mediation hypothesis and need to test and report it correctly.
The causal-steps method, and why it has been superseded
Baron and Kenny’s 1986 procedure is still the version most researchers learn first: (1) show X significantly predicts Y; (2) show X significantly predicts M; (3) show M significantly predicts Y, controlling for X; (4) show the effect of X on Y shrinks (partial mediation) or becomes non-significant (full mediation) once M is added. It is intuitive and was, for years, the default.
It is no longer the recommended method, and the correction traces back to the method’s own co-author. David A. Kenny’s account of the field’s history states plainly that requiring a significant total effect of X on Y (step 1) was itself a flawed gate: a real indirect effect can exist with a small or even null total effect, particularly when a direct and indirect effect partially cancel, so step 1 can reject a genuine mediation hypothesis before the mediator is even tested. Kenny also notes that the total effect has low power, so a significant indirect effect without a significant total effect is entirely possible. A 2002 paper by MacKinnon and colleagues formally evaluated the causal-steps approach against the alternatives and found it had the lowest statistical power of the methods compared, while never directly testing the parameter that actually matters, the size of ab itself. That finding moved the field toward directly estimating and testing the indirect effect.
Two practical consequences follow. First, do not gate a mediation analysis on a significant total effect (X→Y); test the indirect effect directly. Second, do not present “the direct effect became non-significant” as proof of full mediation; report the indirect effect’s own estimate and interval, and let the direct-effect (c′) comparison sit alongside it as description, not as the test.
Is the Sobel test still acceptable?
Between the causal-steps era and the current bootstrap standard, many papers used the Sobel test: a normal-theory z-test of ab using the delta-method standard error of a product of two coefficients. It tests the indirect effect directly, which beats causal steps, but it assumes a normal sampling distribution for a statistic that is not normal. The sampling distribution of a product of two normally distributed estimates is asymmetric and heavier-tailed, especially when the true indirect effect is small to moderate. Kenny’s mediation page describes the Sobel test as very conservative and states that it should no longer be used. In Fritz and MacKinnon’s (2007) simulations it needed the largest samples of the five tests compared (see the data table below the body and the sample-size section). For a new analysis it is not the current default, and a reviewer is likely to ask why a bootstrap was not used.
The current standard: bootstrapped indirect effects
The method that displaced both causal steps and Sobel builds the sampling distribution of ab empirically rather than assuming a shape for it. The mechanics follow the resampling-with-replacement logic used for any bootstrap confidence interval (see bootstrapping in statistics) applied to the product term:
- Draw a resample of size n, with replacement, from your original data.
- Re-estimate a and b on that resample and compute ab.
- Repeat thousands of times to build an empirical distribution of ab.
- Take the interval from that distribution. The percentile bootstrap uses the 2.5th and 97.5th percentiles of the resampled ab values for a 95% interval; the bias-corrected (BC or BCa) bootstrap shifts those percentiles to adjust for bias in the resampled distribution.
Mediation is judged significant, conventionally, when the bootstrap confidence interval for ab excludes zero. There is no separate p-value to report for the indirect effect under this approach; the interval is the test.
Percentile or bias-corrected bootstrap?
Older guidance favoured bias correction: Preacher and Hayes (2008) recommended bias-corrected bootstrapping for indirect effects, and Hayes and Scharkow (2013, Psychological Science 24(10), 1918–1927) described it as the most powerful option but slightly liberal, with the percentile bootstrap as a good compromise. Current guidance has moved to the percentile bootstrap. Kenny’s mediation page advises the percentile bootstrap without bias correction, citing Tibbe and Montoya (2022), who describe the percentile bootstrap confidence interval as currently the recommended inferential method for indirect effects and report that bias-corrected intervals have inflated Type I error, especially with samples below about 500. Fritz, Taylor and MacKinnon (2012) explain the mechanism: the elevated Type I error of the bias-corrected bootstrap shows up when sample size is small and the non-zero path is of medium size or larger.
The practical rule is to default to the percentile bootstrap, and to say in the write-up which interval you used and why. The bias-corrected interval’s extra power is real, but it comes with a false-positive rate above the nominal level, which is a poor trade for a finding you want to be believed.
How many resamples?
Preacher and Hayes (2008) recommend at least 5,000 resamples for final reporting, although 1,000 is probably sufficient for preliminary analyses. A low count lets the interval bounds shift between runs, so raise it before a result goes into a manuscript.
Choosing a test: power versus Type I error
The data table below the body compares five tests of the indirect effect on the sample size each needs for 80% power, using Table 3 of Fritz and MacKinnon (2007), alongside what later sources say about each. The trade-off it shows is the one that matters when you choose:
- Sobel is least powerful and, per Kenny, should no longer be used.
- Joint significance (both a and b significant) and the distribution of the product (PRODCLIN) need similar samples to each other and fewer than Sobel.
- Percentile bootstrap sits between them and is the test the recent literature recommends.
- Bias-corrected bootstrap needs the smallest sample for 80% power, but that apparent advantage comes from its inflated Type I error.
Power is therefore not the only criterion: a test that rejects more often is also rejecting more often when there is no indirect effect.
Sample size: how much data a mediation test needs
Underpowered mediation studies are common because the indirect effect is a product of two coefficients, and detecting a product reliably takes more data than detecting either coefficient alone. Fritz and MacKinnon’s 2007 simulation study (Psychological Science 18(3)) tabulated the N required for 80% power across small, medium and large a and b paths and several tests, using standardized effect sizes of 0.14 (small), 0.39 (medium) and 0.59 (large).
For two medium paths, the bias-corrected bootstrap reached 80% power at N = 71, against 74 for joint significance, 78 for the percentile bootstrap and 90 for Sobel. So the saving over Sobel is 19 participants, and over joint significance only 3. Because the 71 comes from the test with inflated Type I error, the percentile bootstrap figure of 78 is the more realistic planning number. Two small paths push the requirement into the hundreds (558 for the percentile bootstrap); the data table below gives all three effect-size combinations.
Two further planning points. Fritz and colleagues (2012) show that power can plateau or even fall as the a path grows when b is small, so do not assume a larger a always helps. And rather than reusing a table value as a rule of thumb, run a power analysis for your own expected effect sizes: Kenny names the tools MedPower, mc_power_med and the R package pwr2ppl, and in his worked example with N = 100 the power for the indirect effect is about .96 while power for the total effect is only .36. See statistical power analysis for the general procedure; the a and b effect sizes are the two inputs a mediation power analysis needs that a simple two-group analysis does not.
Hayes’ PROCESS and other software
Andrew F. Hayes’ PROCESS macro runs in SPSS and SAS, and PROCESS for R was released in 2020. Simple mediation is PROCESS’s Model 4: specify X, M and Y, request a bootstrap indirect-effect confidence interval, and PROCESS returns a, b, the direct effect (c′), the total effect (c) and the bootstrap CI for ab in one run. It also handles parallel and serial multiple-mediator models and moderated mediation (conditional indirect effects and the index of moderated mediation) without requiring a full structural equation model. The third edition of Hayes’ book on mediation, moderation and conditional process analysis adds an option to test an X-by-M interaction and the partial correlation between mediators.
In R, the mediation package (version 4.5.1, published on CRAN on 2025-06-07) implements the causal mediation methods of Imai, Keele and Yamamoto (2010), Imai, Keele and Tingley (2010) and Imai, Tingley and Yamamoto (2013), plus sensitivity analysis for certain parametric models. You can also fit the mediation model as a path model in a general SEM package and request bootstrapped standard errors for the indirect effect; see structural equation modeling if your design involves latent variables or several simultaneous paths.
Multiple mediators
Preacher and Hayes (2008, Behavior Research Methods 40(3), 879–891) show that bootstrapping gives confidence intervals for each specific indirect effect and for contrasts between indirect effects, and that the bootstrap intervals do not depend on whether the mediators’ residual covariances are freed. The product-of-coefficients approach, by contrast, needs a normal sampling distribution.
Effect size for the indirect effect
Because ab is a product of two effects, Kenny suggests squaring Cohen’s benchmarks of .1, .3 and .5 to get .01, .09 and .25 as small, medium and large values for a standardized indirect effect. These are rough conventions, not thresholds, and should accompany the interval rather than replace it.
The intuitive “proportion mediated” (ab divided by c) is a weaker choice. Kenny calls it theoretically informative but very unstable, and says he would compute it only if the standardized total effect c is at least ±.2 in absolute size. When c is small, which happens in the partial-cancellation cases described above, the ratio can exceed 1 or go negative. See effect size in research for effect-size conventions generally.
Statistical mediation is not automatically causal mediation
A significant bootstrap interval for ab tells you the indirect effect is estimable and distinguishable from zero in your data. It does not tell you that M causally transmits X’s effect to Y. Kenny lists “no confounding” (no variable that causes both M and Y) as a key assumption. Interpreting ab causally requires sequential ignorability: no unmeasured confounding of the M→Y relationship, given X and the covariates in the model. That assumption cannot be tested from the data in hand.
It is a genuine gap even when X was randomly assigned. Randomizing X protects the X→M and X→Y paths from confounding, but participants are never randomized to a level of M, so whatever else caused a given level of M, and also affects Y, remains a live confound of the M→Y path unless it is measured and controlled or M is itself experimentally manipulated. This is the same problem described in endogeneity: sources and remedies; a mediation model is one place it shows up, not an exception.
The causal mediation framework of Imai, Keele and Tingley (2010, Psychological Methods 15(4), 309–334, doi 10.1037/a0020761) gives a model-free definition of causal mediation effects, states the identifying assumption (sequential ignorability) explicitly, and provides a sensitivity analysis for unobserved M–Y confounding. That sensitivity analysis is implemented in the R mediation package and is worth adopting whenever the causal claim, not just the statistical association, is the point of the paper.
How to report a mediation analysis
A reviewer checking a mediation write-up generally looks for all of the following, not a subset:
- The method by name and software. State that indirect effects were tested with a bootstrap confidence interval, name the type (percentile or bias-corrected) and the tool (for example PROCESS with its version and model number, or the specific R package and function). “Mediation was tested” with no method named is not sufficient.
- Resample count. State how many resamples were drawn (at least 5,000 for final reporting) rather than leaving the software default unstated.
- All path coefficients, not only the indirect effect. Report a (X→M), b (M→Y controlling for X), c′ (X→Y controlling for M) and c (X→Y without M), each with its own standard error or interval, alongside ab.
- The indirect effect’s point estimate and its bootstrap confidence interval, not a p-value for ab.
- Whether the mediation hypothesis was specified before or after seeing the data. A pre-registered single-mediator model and a mediator chosen from several candidates after the fact carry different evidentiary weight.
- An explicit statement of the causal assumption (sequential ignorability) whenever the wording implies that M carries the effect of X.
Write-up template
Fill the bracketed slots from your own output; the wording is a template, not a result.
We tested the indirect effect of [X] on [Y] through [M] using [software, version, model] with [percentile / bias-corrected] bootstrap confidence intervals based on [number] resamples. [X] predicted [M] (a = [estimate], 95% CI [lower, upper]), and [M] predicted [Y] controlling for [X] (b = [estimate], 95% CI [lower, upper]). The indirect effect was ab = [estimate], 95% CI [lower, upper]. The direct effect was c′ = [estimate] and the total effect was c = [estimate]. Interpreting the indirect effect causally assumes no unmeasured confounding of the [M]–[Y] relationship given [X] and [covariates].
Common mistakes to check for before submission
- Requiring a significant total effect (X→Y) before testing mediation, the superseded causal-steps step 1, which can reject a real indirect effect.
- Reporting a Sobel z or p-value as the primary test with no bootstrap interval.
- Using the bias-corrected bootstrap by default in a small sample without acknowledging its inflated Type I error.
- Planning sample size from the bias-corrected bootstrap figure (N = 71 for two medium paths) rather than the percentile bootstrap (78).
- Claiming “full mediation” from a non-significant direct effect alone, without reporting the indirect effect’s own interval.
- Testing mediation on a cross-sectional, single-timepoint dataset and describing the result in causal, longitudinal language (“M leads to”, “as a result of”) that the design cannot support.
- Treating a significant ab interval as confirmation that M is the correct or only mechanism when an unmeasured third variable on the M→Y path was never ruled out.
- Reporting “proportion mediated” as the headline effect size when the total effect is small.
Frequently asked questions
Should I use the percentile or the bias-corrected bootstrap?
Use the percentile bootstrap. Kenny and Tibbe and Montoya (2022) recommend it, because bias-corrected intervals have inflated Type I error, especially with samples below about 500, even though they are somewhat more powerful.
Is the Sobel test still acceptable?
Kenny states that it is very conservative and should no longer be used. Where a paper replicates an older study’s original method it may appear, but report a bootstrap interval alongside it rather than in place of it.
How many bootstrap resamples should I use?
At least 5,000 for final reporting; Preacher and Hayes (2008) consider 1,000 probably sufficient only for preliminary analyses.
What sample size do I need to detect a mediated effect?
It depends on the sizes of the a and b paths. For two medium paths (0.39 each), Fritz and MacKinnon (2007) report 78 participants for 80% power with the percentile bootstrap (71 with the bias-corrected bootstrap, 90 with Sobel); for two small paths (0.14 each) the percentile bootstrap needs 558. Run a mediation-specific power analysis for your own expected effects.
Does a significant indirect effect prove causation, and does randomizing X make it causal?
No to both. Randomizing X protects the X→M and X→Y paths but not the M→Y path, which can still be confounded. Causal interpretation requires sequential ignorability, which the sensitivity analyses in the causal mediation framework help you probe.
What counts as a small, medium or large indirect effect?
Kenny suggests squaring Cohen’s .1, .3 and .5, giving .01, .09 and .25 for a standardized indirect effect.
Why shouldn’t I report proportion mediated?
Kenny calls it very unstable. It can exceed 1 or turn negative when the total effect is small, and he would compute it only when the standardized total effect is at least ±.2.
Do I need a significant total effect?
No. The total effect has low power, and a real indirect effect can coexist with a small or null total effect, so test the indirect effect directly.
Can I test more than one mediator at once?
Yes. Parallel multiple-mediator models test several mediators simultaneously and report each specific indirect effect net of the others, while serial models chain mediators in a specified causal order. Both are supported in PROCESS and in general SEM path-model specifications, and bootstrapping can also compare indirect effects with one another (Preacher and Hayes, 2008).
Sources
- Kenny, D. A., Mediation: https://davidakenny.net/cm/mediate.htm
- Tibbe, T. D. and Montoya, A. K. (2022), Correcting the Bias Correction for the Bootstrap Confidence Interval in Mediation Analysis, Frontiers in Psychology: https://www.frontiersin.org/journals/psychology/articles/10.3389/fpsyg.2022.810258/full
- Fritz, M. S., Taylor, A. B. and MacKinnon, D. P. (2012), Explanation of Two Anomalous Results in Statistical Mediation Analysis: https://pmc.ncbi.nlm.nih.gov/articles/PMC3773882/
- Preacher, K. J. and Hayes, A. F. (2008), Asymptotic and resampling strategies for assessing and comparing indirect effects in multiple mediator models, Behavior Research Methods 40(3): https://quantpsy.org/pubs/preacher_hayes_2008b.pdf
- Fritz, M. S. and MacKinnon, D. P. (2007), Required sample size to detect the mediated effect, Psychological Science 18(3), Table 3 as reproduced in a public replication: https://github.com/replisims/fritz-2007
- CRAN, mediation package: https://cran.r-project.org/web/packages/mediation/index.html
- Hayes, A. F., Introduction to Mediation, Moderation, and Conditional Process Analysis: https://www.afhayes.com/introduction-to-mediation-moderation-and-conditional-process-analysis.html
Data: Mediation tests compared: sample size for 80% power (Fritz & MacKinnon 2007) and later guidance on each test
Compiles the sample size needed for .80 power to detect a mediated effect with five tests at three effect-size combinations (a path, b path), taken from Table 3 of Fritz and MacKinnon (2007) as reproduced in a public replication, alongside what Kenny's mediation page and Tibbe and Montoya (2022) say about each test. Effect sizes are standardized path coefficients: small 0.14, medium 0.39, large 0.59.
Period covered: 2007/2022.
| Test of the indirect effect | N, small a and small b (participants) | N, medium a and medium b (participants) | N, large a and large b (participants) | Guidance in later sources |
|---|---|---|---|---|
| Sobel test | 667 | 90 | 42 | Kenny: very conservative, assumes a normal sampling distribution, 'should no longer be used' |
| Joint significance test | 530 | 74 | 36 | Not assessed in the later sources compiled |
| Distribution of the product (PRODCLIN) | 539 | 74 | 35 | Not assessed in the later sources compiled |
| Percentile bootstrap CI | 558 | 78 | 36 | Kenny and Tibbe and Montoya (2022): the recommended test for the indirect effect |
| Bias-corrected bootstrap CI | 462 | 71 | 34 | Highest power but inflated Type I error, especially with n below 500 (Fritz, Taylor and MacKinnon 2012; Tibbe and Montoya 2022) |
Sources
- Fritz & MacKinnon (2007), Required Sample Size to Detect the Mediated Effect, Psychological Science 18(3); Table 3 as reproduced in the replisims replication (accessed 2026-11-20)
- Kenny, Mediation (David A. Kenny's mediation page) (accessed 2026-11-20)
- Tibbe & Montoya (2022), Correcting the Bias Correction for the Bootstrap Confidence Interval in Mediation Analysis, Frontiers in Psychology (accessed 2026-11-20)
- Fritz, Taylor & MacKinnon (2012), Explanation of Two Anomalous Results in Statistical Mediation Analysis, PMC3773882 (accessed 2026-11-20)
Compiled by CASRAI from the sources above. Free to reuse under CC BY 4.0 with attribution.







