Calculate the indirect (mediated) effect from paths a and b or from total minus direct effect, with proportion mediated, or run a Sobel z test.

Describes the supplied coefficients; it does not rescale them.

Optional settings

Calculator Functions

FunctionWhat it doesWhat it requires
Indirect effect from paths a and bFinds the indirect effect as the product of the two paths through the mediator, with the implied total effect and two ratiosRequires path a, path b, the direct effect c′ and the coefficient scale
Indirect effect from total and directFinds the indirect effect as the total effect minus the direct effect, with the same two ratiosRequires the total effect c, the direct effect c′ and the coefficient scale
Sobel z testTests whether the indirect effect differs from zero, giving its standard error, z statistic and two-sided p-valueRequires path a, path b and the standard error of each

Coefficients may be positive or negative. The coefficient scale, standardized or unstandardized, only labels the result and does not rescale anything, so all coefficients must already be on the same scale. The Sobel z test needs unstandardized coefficients with their own standard errors.

Mediation Effect Size Formulas

ab = c − c′ [1]
abIndirect (mediated) effect of X on Y through the mediator M
aEffect of X on M
bEffect of M on Y, adjusted for X
cTotal effect of X on Y
c′Direct effect of X on Y, adjusted for M

The coefficients come from three regressions: Y on X gives c, Y on X and M gives c′ and b, and M on X gives a [1]. For ordinary least squares with a single mediator, the product a × b and the difference c − c′ are the same number [1] [2].

Indirect effect from paths a and b

Indirect = a × b

The total effect is then taken as c′ + a × b. With a = 0.5, b = 0.4 and c′ = 0.3, the indirect effect is 0.2 and the total effect is 0.5. Two ratios follow: indirect ÷ total, often called the proportion mediated, is 40%, and indirect ÷ direct is 0.667.

Indirect effect from total and direct

The main formula applies as written. A total effect of 0.5 and a direct effect of 0.3 leave an indirect effect of 0.2. The same two ratios are shown. Indirect ÷ total is undefined when the total effect is zero, and indirect ÷ direct is undefined when the direct effect is zero.

Sobel z test

SE = √(b² × sa² + a² × sb²) [2]
z = a × b ÷ SE [2]

sa and sb are the standard errors of a and b. This is the first-order standard error derived by Sobel, and z is compared with the standard normal distribution [2]. The p-value shown is two-sided. With a = 0.5, b = 0.4 and both standard errors 0.1, SE = 0.0640, z = 3.123 and p = 0.0018. The exact form adds the small term sa² × sb² under the root [2], and it is left out here.

Limits of This Estimate

  • a × b equals c − c′ for linear models fitted by least squares. In logistic, probit, multilevel and survival models the two are not always equal [1], so results from those models should not be mixed here.
  • The Sobel z test assumes the product a × b is normally distributed. It is often skewed, which gives the test low power, especially in small samples [2]. The test is not a bootstrap analysis.
  • When the direct and indirect effects have opposite signs, known as inconsistent mediation [1], the ratio indirect ÷ total can be negative or above 100%. It is then not a share of the effect explained, and the calculator shows a caution.
  • Coefficients alone do not show that the mediator causes the outcome. That depends on the study design, the order of events in time and what else was controlled for.

Sources

  1. MacKinnon, Fairchild and Fritz (2007), Mediation Analysis, Annual Review of Psychology 58: the three regression equations, ab = c − c′ and when it fails, and inconsistent mediation
  2. MacKinnon, Lockwood, Hoffman, West and Sheets (2002), A Comparison of Methods to Test Mediation and Other Intervening Variable Effects, Psychological Methods 7(1): the Sobel standard error and z test, the exact standard error, and the low power of the test