Skip to main content
v2026.11,610 entries · CC-BY 4.0

Mediation Analysis: Methods and Reporting

A guide to testing mediation with bootstrapped indirect effects rather than the outdated Baron-and-Kenny causal-steps method, including Hayes’ PROCESS macro, sample-size planning, and how to report results.

Ask about Mediation Analysis: Methods and Reporting

Answers are drawn from this guide and the rest of the CASRAI corpus, with a link to every source.

Answers are AI-generated from CASRAI’s own published pages and can be wrong, so check the linked sources before relying on one; your question is logged without personal data — never sold, never used to train a third-party model — to show us what CASRAI is missing, so please do not type personal or confidential details. How we use this

Written and maintained by CASRAI Editorial Board

Last updated

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. The quantity of interest is the indirect effect, conventionally written ab: the product of the X→M path (a) and the M→Y path (b), controlling for X. This page covers how that indirect effect is actually tested today, why the causal-steps approach most researchers were taught is now considered outdated, and what a reviewer expects to see in the write-up. 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 know you have a mediation hypothesis and need to test and report it correctly.

The causal-steps method, and why it’s 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 own 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, medium-sized 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. 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 is what moved the field toward directly estimating and testing the indirect effect, rather than inferring mediation indirectly from a sequence of significance tests.

Two practical consequences follow. First, don’t gate a mediation analysis on a significant total effect (X→Y) — test the indirect effect directly regardless of whether that first step clears significance. Second, don’t present “the direct effect became non-significant” as proof of full mediation; report the indirect effect’s own estimate and interval instead, and let the direct-effect (c′) comparison sit alongside it as description, not as the test.

The Sobel test isn’t the fix

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 the product of two coefficients. It directly tests the indirect effect, which is an improvement over causal steps — but it carries its own well-documented problem. The sampling distribution of a product of two normally-distributed estimates (a and b) is not itself normal; it’s asymmetric and heavier-tailed, especially when the true indirect effect is small to moderate, which is the range most published effects actually fall in. A test that assumes normality for a statistic that isn’t normally distributed is underpowered exactly where researchers need power most, and it requires larger samples than the bootstrap alternative to detect the same true effect. Sobel is still occasionally seen in older or replicated designs, but if you’re planning a new analysis, it isn’t the current default and a reviewer is likely to ask why bootstrapping wasn’t used instead.

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 same resampling-with-replacement logic used for any bootstrap confidence interval (see bootstrapping in statistics for the general mechanics) applied specifically to the product term:

  1. Draw a resample of size n, with replacement, from your original data.
  2. Re-estimate a and b on that resample and compute ab.
  3. Repeat several thousand times to build an empirical distribution of ab.
  4. Take the interval directly 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 (BCa) bootstrap adjusts those percentiles for skew and median bias in the resampled distribution, and is the more commonly recommended variant because mediation’s product-term distribution is asymmetric almost by construction.

Because the interval is built from the actual resampled distribution rather than a normal-theory formula, it doesn’t inherit the Sobel test’s core problem. 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 itself under this approach; the interval is the test. 5,000 resamples is a common default in current practice and is enough for a stable percentile or BCa interval in most single-mediator models; some software defaults to fewer (1,000) for speed during exploratory work, but a resample count that low is worth increasing before a result goes into a manuscript, since the interval bounds can shift slightly run to run at low resample counts.

Hayes’ PROCESS and other implementations

Andrew F. Hayes’ PROCESS macro (available as an add-on for SPSS and SAS, and as an R package) is the most widely used tool for running this analysis without hand-coding the resampling loop. Simple mediation is PROCESS’s Model 4: specify X, M, and Y, request a bootstrap indirect-effect confidence interval, and PROCESS returns the a, b, direct effect (c′), total effect (c), and the bootstrap CI for ab in one run. It also handles more complex specifications — parallel and serial multiple-mediator models, and moderated mediation (conditional indirect effects, PROCESS’s “index of moderated mediation”) — without requiring a full structural equation model. Outside PROCESS, the same bootstrap logic is available in R via the mediation package (which additionally supports the counterfactual/potential-outcomes framing described below) or by fitting the mediation model as a path model in a general SEM package and requesting bootstrapped standard errors for the indirect effect — see structural equation modeling if your design already involves latent variables or multiple simultaneous paths rather than a single observed mediator.

Sample size: how much data a mediation test actually 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, which remains the standard reference for planning sample size in this design, tabulated the N required to detect a mediated effect at 80% power across combinations of small, medium, and large a and b paths and several test methods. For two medium-sized component paths — a common, realistic planning assumption — the bias-corrected bootstrap reached 80% power at N = 71, meaningfully fewer participants than the causal-steps or Sobel approaches needed for the same power at the same effect sizes. Two small component paths push the required N into the many hundreds. Run a proper power analysis for your specific expected effect sizes before data collection rather than reusing this single figure as a rule of thumb — see statistical power analysis for the general procedure, and treat the a-path and b-path effect sizes as the two numbers a mediation-specific power analysis needs that a simple two-group power analysis doesn’t.

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, by itself, tell you M causally transmits X’s effect to Y. Interpreting ab causally requires an assumption called sequential ignorability: no unmeasured confounding of the M→Y relationship, given X and any covariates already in the model. That assumption is not testable from the data you have, and it is a genuine gap even in an experiment where X was randomly assigned: randomizing X only guarantees the X→M and X→Y paths are free of confounding, because participants are randomized to a level of X, never to a level of M itself. Whatever caused people to land at a given level of M beyond what X assigned them — and whatever else that cause also affects in Y — remains a live confound of the M→Y path unless it’s measured and controlled or M was itself experimentally manipulated. This is structurally the same problem documented in general terms at endogeneity: sources and remedies; a mediation model is one specific place that problem shows up, not an exception to it. The causal mediation / counterfactual framework (formalized in work building on Imai, Keele, and Tingley, and implemented in R’s mediation package) makes this assumption explicit and lets you probe how sensitive your conclusion is to a plausible amount of unmeasured confounding — 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 for current best practice is generally looking 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 (percentile or bias-corrected, name which one) and the tool used (e.g. Hayes’ PROCESS macro, version and model number, or the specific R package/function) — “mediation was tested” with no method named is no longer sufficient.
  • Resample count. Report how many bootstrap resamples were drawn (5,000 is common; state it explicitly rather than leaving the software default unstated).
  • All relevant path coefficients, not only the indirect effect. Report a (X→M), b (M→Y controlling for X), c′ (the direct effect, X→Y controlling for M), and c (the total effect, X→Y without M in the model), each with its own standard error or CI, alongside ab.
  • The indirect effect’s point estimate and its bootstrap confidence interval — not a p-value for ab, since the interval-excludes-zero criterion is the actual test being run.
  • Whether the mediation hypothesis was specified before or after seeing the data. A pre-registered single-mediator model and a mediator identified by searching several candidates after the fact carry different evidentiary weight, and current reporting norms expect that distinction to be stated rather than left implicit.
  • An explicit statement of the causal assumption being made (sequential ignorability) when the write-up’s language implies M causes the transmission, rather than describing only a statistical association — even a single sentence acknowledging the assumption and why it’s plausible (or not fully testable) in this design is now commonly expected, particularly in fields that have adopted the causal-mediation framing.

Effect-size reporting for the indirect effect specifically is worth a caution: the intuitive-sounding “proportion mediated” (ab divided by c) is unstable and can exceed 1 or go negative whenever the total effect c is small, which is common in exactly the partial-cancellation scenarios described above — it is not a safe default effect-size measure for mediation the way R² is for a regression model. See effect size in research for effect-size conventions generally, and prefer a standardized ab coefficient or a purpose-built mediation effect size (e.g. kappa-squared) over the raw proportion-mediated ratio if a standardized effect size is requested.

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/p-value as the primary test with no bootstrap CI alongside it.
  • 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-sounding language (“M leads to,” “as a result of”) the design can’t actually 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 without checking whether the total effect c is small enough to make that ratio unstable.

Frequently asked questions

Is the Sobel test ever still acceptable to use?

It is not the current default and most methods reviewers will expect bootstrapping instead, particularly for a new analysis. It occasionally appears where a paper is directly replicating an older study’s original method, but even then it is common practice to report a bootstrap CI alongside it rather than in place of it.

How many bootstrap resamples should I use?

5,000 is a common and generally sufficient default for a single-mediator model; some software defaults lower (1,000) for speed, which is fine for exploratory checks but worth raising before a result is reported in a manuscript, since interval bounds can move slightly between runs at low resample counts.

Does randomly assigning the predictor make the mediation causal?

No. Randomizing X removes confounding of the X→M and X→Y paths, but participants are never randomized to a level of M itself, so the M→Y path can still be confounded by whatever besides X caused a given level of M. The causal-mediation framework treats this explicitly rather than assuming it away.

What sample size do I need for a mediation analysis?

It depends on the expected size of the a-path and b-path individually, not just the total effect. As a planning reference, Fritz and MacKinnon (2007) found N = 71 reached 80% power for the bias-corrected bootstrap with two medium-sized component paths; two small paths require several hundred. Run a mediation-specific power analysis for your own expected effect sizes rather than using a single figure as a rule of thumb.

Can I test more than one mediator at once?

Yes — parallel multiple-mediator models test several mediators simultaneously and report each one’s specific indirect effect net of the others, while serial multiple-mediator models chain mediators in a specified causal order. Both are supported directly in Hayes’ PROCESS (later model numbers) and in general SEM path-model specifications.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →

Regulatory Radar

Stop finding out after the fact

$29/month, cancel anytime. Daily digest updates from our analysis, a dashboard holding the same items, and a cited assistant for everything they raise.

  • Federal Register, Federal Register+, Grants.gov, Regulations.gov, NSF News, UKRI, plus CASRAI’s own published content.
  • 44,322 indexed passages, and every answer cites the ones it drew on.