# The Sobel Test and other mediation models

Note: the Sobel test works well only in large samples. We recommend using this test only if the user has no access to raw data. If you have the raw data, bootstrapping offers a much better alternative that imposes no distributional assumptions. Consult Preacher and Hayes (2004) here for details and easy-to-use macros that run the necessary regression analyses for you including bootstrap estimates which they recommend over the usual asymptotic inference for smaller samples:

Preacher, K. J., & Hayes, A. F. (2004). SPSS and SAS procedures for estimating indirect effects in simple mediation models. *Behavior Research Methods, Instruments, & Computers*, **36(4)**, 717-731.

Details of how to fit a bootstrap confidence interval for a mediation effect using EXCEL are given here. A SPSS macro code for fitting more general groups of more complex moderated mediation models is given here which includes Sobel as a special case (of one unmoderated mediator). It is recommended that the process.zip file is downloaded). PROCESS is the collective program name for a suite of SPSS macros that will fit mediation models (such as Sobel) and moderation models described in detail at:

Hayes, A. F. (2012). PROCESS: A versatile computational tool for observed variable moderation, mediation, and conditional process modeling.

PROCESS does not fit models with dichotomous mediators but these may be fitted using an EXCEL spreadsheet created by Nathaniel Herr using equations of MacKinnon and Dwyer (1993) downloadable from here or by using SPSS or SAS macros which are described and available in:

Valeri, L. and VanderWeele, T. J. (2013). Mediation analysis allowing for exposure-mediator interactions and causal interpretation: theoretical assumptions and implementation with SAS and SPSS macros. *Psychological Methods* **18(2)** 137-150.

Field (2013, p.394) explains how to install these macros in the PROCESS program into SPSS to run using the more familiar dialogue boxes from the analyze menu using a special .spd file in the zip file from the Hayes website mentioned above.

There are also details of SPSS macros in the appendices of

Hayes AF (2013). Introduction to mediation, moderation and conditional process analysis. A regression-based approach. Guilford Press:New York.

An extended version using SPSS and SAS syntax to fit models with more than one mediating variable is available from here.

Preacher, K. J., & Hayes, A. F. (2008). Asymptotic and resampling strategies for assessing and comparing indirect effects in multiple mediator models. *Behavior Research Methods*, **40**, 879-891.

There is also an EXCEL spreadsheet (SPSSEffectsCalc.xls here) and an accessibly written 'how to' guide containing SPSS syntax (SPSSInstructions.pdf here) for random effects mediation as described by Bauer, Preacher and Gil (2006). This model can also be fitted using a SAS macro (details in the paper and supplementary materials are given here.)

Bauer, D. J., Preacher, K. J. and Gil, K. M. (2006). Conceptualizing and Testing Random Indirect Effects and Moderated Mediation in Multilevel Models: New Procedures and Recommendations. *Psychological Methods* **11(2)** 142-163.

(This paper is available free using Sciencedirect for CBSU users). It is also possible to fit random effects mediation models in the statistical software, package, STATA.

## Mediation effects

A variable may be considered a mediator to the extent to which it carries the influence of a given independent variable (IV) to a given dependent variable (DV). Generally speaking, mediation can be said to occur when (1) the IV significantly affects the mediator, (2) the IV significantly affects the DV in the absence of the mediator, (3) the mediator has a significant unique effect on the DV, and (4) the effect of the IV on the DV shrinks upon the addition of the mediator to the model. These criteria can be used to informally judge whether or not mediation is occurring, but MacKinnon & Dwyer (1993) and MacKinnon, Warsi, & Dwyer (1995) have popularized statistically based methods by which mediation may be formally assessed.

## Purpose of Sobel test

To test whether a mediator carries the influence of an IV to a DV. The DV and mediator are assumed to be continuous variables. If one or more of these are dichotomous then there are scale problems in the regressions but MacKinnon and Dwyer (1993) have suggested a solution when the DV or M are dichotomous which may be implemented using the preferred bootstrapping technique in SPSS here or using an EXCEL spreadsheet to compute Sobel's test with inputs computed using SPSS here.

## A friendly warning

Blind use of this application without a proper understanding of mediation or the logic behind these tests will lead to erroneous conclusions. Please consult the references before proceeding.

## An illustration of mediation

a, b, and c are path coefficients. Variables in parentheses are standard errors of those path coefficients.

Description of numbers needed

a = raw (unstandardized) regression coefficient for the association between IV and mediator with its square denoted by a2.

sa = standard error of a with its square (ie variance) denoted by sa2.

b = raw coefficient for the association between the mediator and the DV (when the IV is also a predictor of the DV) with its square denoted by b2.

sb = standard error of b with its square (ie variance) denoted by sb2.

To get these numbers

- Run a regression analysis with the IV predicting the mediator. This will give a and sa.
- Run a regression analysis with the IV and mediator predicting the DV. This will give b and sb. Note that sa and sb should never be negative.

## To conduct the Sobel test

Details can be found in Baron and Kenny (1986), Sobel (1982), Goodman (1960), and MacKinnon, Warsi, and Dwyer (1995). An on-line calculator for the Sobel Test is here. We should note that there are three principal versions of the "Sobel test" - one that adds the third denominator term (Aroian, 1944/1947 - this is the version popularized by Baron & Kenny as the Sobel test), one that subtracts it (Goodman, 1960), and one that does not include it at all. The Aroian and Goodman may be computed here. We stress that researchers should consult MacKinnon, Lockwood, Hoffman, West, and Sheets (2002), as well as sources cited therein, before attempting to interpret the results of any of these tests. Researchers should consult Krull & MacKinnon (1999) before attempting to apply the Sobel test to parameter estimates obtained from multilevel modeling.

Formulae for the tests provided here were drawn from MacKinnon & Dwyer (1994) and from MacKinnon, Warsi, & Dwyer (1995):

## Sobel test equation

- z-value = a*b/SQRT(b2*sa2 + a2*sb2)

## Aroian test equation

- z-value = a*b/SQRT(b2*sa2 + a2*sb2 + sa2*sb2)

A spreadsheet computing the z-value for the Aroian test and comparing two mediation effects: ab with cd from *different* subjects (ie independent) is given here.

## Goodman test equation

z-value = a*b/SQRT(b2*sa2 + a2*sb2 - sa2*sb2)

The Sobel test equation omits the third term of the variance estimate in the denominator. We recommend using the Aroian version of the Sobel test suggested in Baron and Kenny (1986) because it does not make the unnecessary assumption that the product of sa and sb is vanishingly small. The Goodman version of the test subtracts the third term for an unbiased estimate of the variance of the mediated effect, but this can sometimes have the unfortunate effect of yielding a negative variance estimate.

The Sobel test and the Aroian test seemed to perform best in a Monte Carlo study (MacKinnon, Warsi, & Dwyer, 1995), and converge closely with sample sizes greater than 50 or so. An overview of mediation analysis is given by MacKinnon (2008). Preacher and Kelley (2011) have suggested effect sizes that could be used to express a mediation effect (see here.)

The effect size for Sobel's test $$(Kappa^{2}) $$ is described and may be computed here. Further details of how $$Kappa^{2 }$$ is worked out are given in Preacher and Kelley (2011) although more recently this measure has been criticised and instead a simple more clearly defined, and easier to compute, effect size suggested by Wen and Fan (2015).

Wiedermann & von Eye (2015) give a worked example to illustrate the use of skewness of model residuals to choose between models having opposite directions of causality with models with non-skewed residuals preferred.

## References

Aroian, L. A. (1944/1947). The probability function of the product of two normally distributed variables.

*Annals of Mathematical Statistics*,**18**, 265-271.Baron, R. M., & Kenny, D. A. (1986). The moderator-mediator variable distinction in social psychological research: Conceptual, strategic, and statistical considerations.

*Journal of Personality and Social Psychology*,**51**, 1173-1182.

Bauer, D.J., Preacher, K.J. and Gil, K.M. (2006). Conceptualizing and testing random indirect effects and moderated mediation in multilevel models: new procedures and recommendations.

*Psychological Methods*,**11(2)**, 142-163.

(Generalizes mediation to random effects models).

Field, A. (2013). Discovering statistics using IBM SPSS Statistics. Fourth Edition. Sage:London.

Goodman, L. A. (1960). On the exact variance of products.

*Journal of the American Statistical Association*,**55**, 708-713.

Howell, D. C. (2013). Statistical methods for psychology. 8th Edition. International Edition. Wadsworth:Belmont,CA. (Pages 546-550 cover mediation analysis).

Hoyle, R. H., & Kenny, D. A. (1999). Sample size, reliability, and tests of statistical mediation. In R. Hoyle (Ed.) Statistical Strategies for Small Sample Research. Thousand Oaks, CA: Sage Publications.

Krull, J. L., & MacKinnon, D. P. (1999). Multilevel mediation modeling in group-based intervention studies.

*Evaluation Review*,**23(4)**, 418-444.MacKinnon, D. P. (2008) Introduction to statistical mediation analysis (Multivariate Applications Series). Lawrence Erlbaum:New York.

MacKinnon, D. P., & Dwyer, J. H. (1993). Estimating mediated effects in prevention studies.

*Evaluation Review*,**17**, 144-158.MacKinnon, D. P., Lockwood, C. M., Hoffman, J. M., West, S. G., & Sheets, V. (2002). A comparison of methods to test mediation and other intervening variable effects.

*Psychological Methods*,**7**, 83-104.MacKinnon, D. P., Warsi, G., & Dwyer, J. H. (1995). A simulation study of mediated effect measures.

*Multivariate Behavioral Research*,**30(1)**, 41-62.MacKinnon, D. P., Warsi, G., & Dwyer, J. H. (1995). "A simulation study of mediated effect measures:"

*Erratum. Multivariate Behavioral Research*,**30(3)**, ii.Preacher, K. J., & Hayes, A. F. (2004). SPSS and SAS procedures for estimating indirect effects in simple mediation models.

*Behavior Research Methods, Instruments, & Computers*,**36(4)**, 717-731.Preacher, K. J., & Kelley, K. (2011). Effect size measures for mediation models:quantitative strategies for communicating indirect effects.

*Psychological Methods***16(2)**93-115.Shrout, P. E., & Bolger, N. (2002). Mediation in experimental and nonexperimental studies: New procedures and recommendations.

*Psychological Methods*,**7(4)**, 422-445.Sobel, M. E. (1982). Asymptotic intervals for indirect effects in structural equations models. In S. Leinhart (Ed.),

*Sociological methodology*1982 290-312. San Francisco: Jossey-Bass.Wen, Z., & Fan, X. (2015). Monotonicity of effect sizes: questioning kappa-squared as mediation effect size measure.

*Psychological Methods***20(2)**193-203.Wiedermann W., & von Eye, A. (2015). Direction of Effects in Mediation Analysis.

*Psychological Methods*,**20(2)**, 221-244. In examining the direction of causality mentioned above this paper helpfully illustrates the regression equations needed for evaluating Sobel's mediation model and illustrates kappa^2 effect size using resultant regression coefficients.

(Note: Psychological Methods papers (in pdf format) are available free for download via Sciencedirect for CBSU users).