Direct effect
The path from X to Y that does not pass through the mediator (c prime).
Mediation analysis asks whether a predictor affects an outcome indirectly, through an intervening mediator, rather than only directly. This page explains direct, indirect and total effects, how to classify mediation, a worked example, and the common pitfalls.
Mediation splits the effect of a predictor X on an outcome Y into two routes. The direct effect is the path straight from X to Y. The indirect effect runs through a mediator M: X affects M, and M affects Y. The indirect effect is the product of those two paths (a times b), and the total effect is the direct plus the indirect effect.
Mediation answers how an effect comes about. If training improves performance partly because it raises motivation, then motivation is the mediator and the training-to-performance effect is partly indirect.
Say X is training, M is motivation and Y is performance. The model estimates a = 0.50 (training to motivation) and b = 0.60 (motivation to performance), so the indirect effect is 0.50 times 0.60 = 0.30. The direct effect c’ is 0.10 and not significant, so the total effect is 0.30 plus 0.10 = 0.40.
Because the indirect effect is significant and the direct effect is not, this is full (indirect-only) mediation: training lifts performance almost entirely by raising motivation.
First test the indirect effect (a times b) with bootstrapping. Then look at the direct effect to classify the type of mediation.
Judge the indirect effect by a bootstrap confidence interval, not by the significance of a and b separately. The older Baron and Kenny causal steps are no longer recommended.
The path from X to Y that does not pass through the mediator (c prime).
The effect routed through the mediator, the product a times b. With several mediators, each chain has its own specific indirect effect.
The direct effect plus all indirect effects of X on Y.
Variance accounted for: the indirect effect divided by the total effect. It expresses how much of the total effect the mediator carries.
OpenPLS reports the direct effect, the specific indirect effect of every mediation chain, and the total effect for each relationship, right in the results. Add bootstrapping to get confidence intervals for the indirect effects and classify the mediation. Free and runs in the browser.
Build X, M and Y in the visual editor, compute, and read the direct, indirect and total effects in one place. Free, no install.
The standard references are Zhao, X., Lynch, J. G., & Chen, Q. (2010). Reconsidering Baron and Kenny: myths and truths about mediation analysis. Journal of Consumer Research, 37(2), 197-206, and Nitzl, C., Roldan, J. L., & Cepeda, G. (2016). Mediation analysis in partial least squares path modeling. Industrial Management & Data Systems, 116(9), 1849-1864. A practical treatment is in Hair, J. F., Hult, G. T. M., Ringle, C. M., & Sarstedt, M. (2022). A Primer on Partial Least Squares Structural Equation Modeling, 3rd ed., Sage.