Testing mediation using bootstrapping in SPSS › ~uqwloui1 › stats › nloxton_mediation... ·...

12
To fully understand the following procedures read these key papers Hayes, A. F. (2009). Beyond Baron and Kenny: Statistical Mediation Analysis in the New Millennium. Communication Monographs, 76(4), 408-420. doi: 10.1080/03637750903310360 Preacher, K. J., & Hayes, A. F. (2004). SPSS and SAS procedures for estimating indirect effects in simple mediation models. Behavior Research Methods, Instruments, and Computers, 36, 717-731. Shrout, P. E., & Bolger, N. (2002). Mediation in experimental and nonexperimental studies: New procedures and recommendations. Psychological Methods, 7(4), 422-445. 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(1), 83-104. This is an interactive PDF - if you are viewing this on a computer connected to the internet: the hypertext links (blue underlined) should take you to the relevant site. Access the relevant datafile by clicking on the link - if you are reading this off a hardcopy: Really??? How old school...well I guess you'll need to boot up the old machine to run the analyses anyway so you may as well open this PDF on screen and access the links (see instructions above) Testing mediation using bootstrapping in SPSS Created by Natalie J. Loxton Page 1

Transcript of Testing mediation using bootstrapping in SPSS › ~uqwloui1 › stats › nloxton_mediation... ·...

Page 1: Testing mediation using bootstrapping in SPSS › ~uqwloui1 › stats › nloxton_mediation... · SPSS and SAS procedures for estimating indirect effects in simple mediation models.

To fully understand the following procedures read these key papers

Hayes, A. F. (2009). Beyond Baron and Kenny: Statistical Mediation Analysis in the New Millennium.Communication Monographs, 76(4), 408-420. doi: 10.1080/03637750903310360

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

Shrout, P. E., & Bolger, N. (2002). Mediation in experimental and nonexperimental studies: Newprocedures and recommendations. Psychological Methods, 7(4), 422-445.

MacKinnon, D. P., Lockwood, C. M., Hoffman, J. M., West, S. G., & Sheets, V. (2002). A comparisonof methods to test mediation and other intervening variable effects. Psychological Methods, 7(1),83-104.

This is an interactive PDF

- if you are viewing this on a computer connected to the internet: the hypertext links (blueunderlined) should take you to the relevant site. Access the relevant datafile by clicking onthe link

- if you are reading this off a hardcopy: Really??? How old school...well I guess you'll need toboot up the old machine to run the analyses anyway so you may as well open this PDF onscreen and access the links (see instructions above)

Testing mediation using bootstrapping in SPSS

Created by Natalie J. Loxton Page 1

Page 2: Testing mediation using bootstrapping in SPSS › ~uqwloui1 › stats › nloxton_mediation... · SPSS and SAS procedures for estimating indirect effects in simple mediation models.

The macros used in this tipsheet can be found at the followingwebsite

http://www.afhayes.com/spss-sas-and-mplus-macros-and-code.html

Also see Hayes's Facebook page(oh, as if you aren't on Facebook.....)

Testing mediation using bootstrapping in SPSS

Created by Natalie J. Loxton Page 2

Page 3: Testing mediation using bootstrapping in SPSS › ~uqwloui1 › stats › nloxton_mediation... · SPSS and SAS procedures for estimating indirect effects in simple mediation models.

For this example we will use the Sobel Macro

Download the SPSS macro to your computerYou should also download the documentation (sobel.pdf) for additional information

Also note as stated on the website that another Macro "INDIRECT.SPS" will also perform the sameanalysis unless you need to estimate a model with dichotomous outcome.

However, for this exercise we will use this macro.

Also note that this version of the macro does not work in SPSS ver 18 (unless you have all thepatches). The older version (sobel_SPSS) does work in ver 18 though.

Testing mediation using bootstrapping in SPSS

Created by Natalie J. Loxton Page 3

Page 4: Testing mediation using bootstrapping in SPSS › ~uqwloui1 › stats › nloxton_mediation... · SPSS and SAS procedures for estimating indirect effects in simple mediation models.

Let's test this model

The dataset can be accessed HERENote the variable names that map onto the SPSS file

Also recall the mediation conventions (from Baron and Kenny, 1986)

Path a = IV to MedVPath b = MedV to DV, controlling for the IV(when multiplied together these are the INDIRECT effect)Path c = IV to DV (aka the TOTAL effect)Path c' = IV to DV, controlling for the MedV (aka the DIRECT effect)

Total effects = Indirect effect + Direct effect

Testing mediation using bootstrapping in SPSS

Created by Natalie J. Loxton Page 4

Page 5: Testing mediation using bootstrapping in SPSS › ~uqwloui1 › stats › nloxton_mediation... · SPSS and SAS procedures for estimating indirect effects in simple mediation models.

1) Run the Macro (Sobel)

Macros are very similar to syntax files and are run as such:Open the file via the "Open Syntax" option

Make sure to select the file "sobel.SPS"

This is the file you downloaded from the Hayes website

Testing mediation using bootstrapping in SPSS

Created by Natalie J. Loxton Page 5

Page 6: Testing mediation using bootstrapping in SPSS › ~uqwloui1 › stats › nloxton_mediation... · SPSS and SAS procedures for estimating indirect effects in simple mediation models.

Run the macro

Select "Run...All"This activates the macro (which runs in the background)You can close the macro file if you wish - this will stay in the background until you either restartSPSS or load a different macro

Testing mediation using bootstrapping in SPSS

Created by Natalie J. Loxton Page 6

Page 7: Testing mediation using bootstrapping in SPSS › ~uqwloui1 › stats › nloxton_mediation... · SPSS and SAS procedures for estimating indirect effects in simple mediation models.

2) Set up your model in another syntax file

In this step you need to tell the macro which of your variables are the IV, DV and Mediator.To do this you need to create a new syntax file and set up your model using this template:

SOBEL Y =DV/X = IV/M = MED/BOOT = 5000.

This is the syntax for the example model:

SOBEL Y =JOBSAT/X = POSAFFECT/M = WSE/BOOT = 5000.

Run this syntax

Note the "boot = 5000"This is the part of the syntax that tells SPSS to draw 5000 sample indirect effects (with replacement)using your sample data as the "population" of possible indirect effects

Testing mediation using bootstrapping in SPSS

Created by Natalie J. Loxton Page 7

Page 8: Testing mediation using bootstrapping in SPSS › ~uqwloui1 › stats › nloxton_mediation... · SPSS and SAS procedures for estimating indirect effects in simple mediation models.

The macro will now run to test your model

Note. This can take a little while as this is performing rather complex equationsTo check if the program is still running you will see a little "Running MATRIX" in the bottom right

Testing mediation using bootstrapping in SPSS

Created by Natalie J. Loxton Page 8

Page 9: Testing mediation using bootstrapping in SPSS › ~uqwloui1 › stats › nloxton_mediation... · SPSS and SAS procedures for estimating indirect effects in simple mediation models.

3. Interpret the output

By default the initial macro will be recorded in the output file (ignore this and scroll to the bottom ofthe output file)

Testing mediation using bootstrapping in SPSS

Created by Natalie J. Loxton Page 9

Page 10: Testing mediation using bootstrapping in SPSS › ~uqwloui1 › stats › nloxton_mediation... · SPSS and SAS procedures for estimating indirect effects in simple mediation models.

Direct and Total Effects output

This part of the output provides the significance tests of the:1) "c" path (IV to DV, aka the Total effect) - in this example significant p = .00622) "a" path (IV to MedV) - in this example significant p =.00003) "b" path (MedV to DV, controlling for the IV) - in this example significant = .00004) "c' " path (IV to DV, controlling for the MedV, aka the Direct effect) - in this example non-significantp = .5159

So, this model has met all the criteria for mediation according to Baron and Kenny (1986) - althoughnote that the IV-DV total effect criteria is no longer necessary (see earlier refs)This coefficients are the Unstandardised B weightsIn the latest macro the bivariate correlations are displayed but to obtain the Standardised Betaweights for paths b and c' you would need to run a multiple regression in SPSS with the IV andMedV as predictors of the DV and report the beta weights)

Testing mediation using bootstrapping in SPSS

Created by Natalie J. Loxton Page 10

Page 11: Testing mediation using bootstrapping in SPSS › ~uqwloui1 › stats › nloxton_mediation... · SPSS and SAS procedures for estimating indirect effects in simple mediation models.

Indirect Effect (Sobel)

This section provides the test of the significance of the INDIRECT effect (path a X path b) using theSobel testIn this example path a = .7356 and path b = .3048So the indirect effect = .2242 (see #1)And is significant using the Sobel test (see #2)

Testing mediation using bootstrapping in SPSS

Created by Natalie J. Loxton Page 11

Page 12: Testing mediation using bootstrapping in SPSS › ~uqwloui1 › stats › nloxton_mediation... · SPSS and SAS procedures for estimating indirect effects in simple mediation models.

Bootstrapped effect

Finally, the output provides the bootstrapped confidence intervals (99 and 95 percentiles arecalculated but we only want to look at the 95%)Here we are looking to see if ZERO (0) lies within the interval rangeNote that LL = Lower Limit (or the lower boundary) and UL = Upper Limit (or upper boundary) of theConfidence interval.Essentially we are asking whether it is possible (with 95% confidence) that the TRUE indirect effectwould be ZERO (basically, no mediation).In this case the TRUE indirect effect is 95% likely to range from .1342 to .3232 - the estimated effectis .2246 (lying in between these two values)If (as in this case) zero does not occur between the LL and the UL then we can conclude that theindirect effect is significant

An example of a non-significant indirect effect would be to have a LL of -.1342 and an UL of .3232(since zero is a possible value between a negative number and a positive number)

For an example of reporting indirect effects using bootstrapping click here (note that this exampleused AMOS but the reporting is similar)

Those wishing more information on this macro and/or mediation etc are advised to refer to the Hayeswebsite or the Facebook mediation website

Please note that the creator of this tipsheet is not associated with the developers of the macros andis unable to provide additional advice on the macro or issues related with mediation or otheranalyses.

Testing mediation using bootstrapping in SPSS

Created by Natalie J. Loxton Page 12