Some SPSS and SAS Macros you may find useful.
(Note: All attempts have been
made to ensure that my macros are working correctly, and they have been checked
extensively. However, as with any software,
I cannot guarantee that the macros are free of bugs or other problems that may
produce incorrect answers in some contexts or situations. Use at your own risk).
NOTE: Some users of SPSS 18 have reported problems with macros and scripts. Click here for more information and a possible solution.
Estimates the size of an indirect effect of X on Y through a mediator Z, using both a normal theory (Sobel’s test) and bootstrap approaches. A SAS version of the macro is also available on this page. For a copy of the paper describing this macro, see 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. For a PDF, click here.
This macro for SPSS and SAS estimates the path coefficients in a multiple mediator model and generates bootstrap confidence intervals (percentile, bias-corrected, and bias-corrected and accelerated) for total and specific indirect effects of X on Y through the mediator(s). This is macro is far superior to SOBEL.SPS, as it allows for more than one mediator and adjusts all paths for the potential influence of covariates not proposed to be mediators in the model. For a copy of the paper describing the methods this macro implements, see 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. For a PDF, click here.
This SPSS macro conducts tests of conditional indirect
effects, also called moderated mediation,
as described in Preacher, K. J., Rucker,
MEDCURVE.SPS
This SPSS macro is used to estimate ‘instantaneous indirect
effects’ in simple mediation models with nonlinear constituent paths. Click here for the syntax reference
and here to download a beta version
of the macro. Email me
for a copy of the corresponding paper: Hayes, A. F., & Preacher, K. J. (in
review). Quantifying and testing
indirect effects in simple mediation models when the constituent paths are
nonlinear. Manuscript submitted for publication.
MEDTHREE.SPS
This SPSS macro extends the SOBEL macro described in Preacher and Hayes (2004) to multiple step models of the form X→M1→M2→Y. Point and bootstrap 95% confidence intervals are provided for indirect effects. Normal theory (a.k.a. ‘Sobel’) tests are not provided. Here is the macro, here is the syntax reference, and here is a copy of a book chapter that is in press with an example of its use. If you would like to cite something in support of your use of this macro, please cite the book chapter.
This SPSS and SAS macro is used for probing single-degree-of-freedom interactions in linear regression models. It implements the ‘pick-a-point’ approach for estimating effects of a focal predictor at specified values of the moderator as well as the Johnson-Neyman technique for calculating regions of significance. It also generates estimated values of the outcome from the model, which is useful for generating visual plots of the interaction. The corresponding paper can be downloaded here, and you can get the macro here. Here is a copy of an unpublished paper showing the dangers of not understanding how to interpret and probe interactions in regression.
This is a paper that describes SPSS and SAS macros for generating heteroscedasticity-consistent standard errors in the linear regression model using the HC0, HC1, HC2, HC3, and HC4 procedures described by MacKinnon and White (1985), Long and Ervin (2000), and Cribari-Neto (2004). An electronic copy of the macros can be obtained here.
This is a paper that describes a new test for the regression coefficients in OLS regression that does not assume homoscedasticity. The paper includes some simulation results showing its superiority over the heteroscedasticity-consistent standard error estimators summarized by Long & Ervin (2000). An electronic copy of the SAS macro can be obtained here.
Computes a bootstrap-based estimate of a population mean and a bias corrected and accelerated 95% confidence interval for the mean.
Permutation test of null hypothesis of random association between X and Y using Pearson’s r or the simple regression weight as the test statistic.
Used to create a multivariate random normal sample of cases from a population with a specific variance-covariance matrix (or correlation matrix).
Used to compute Z’ for pooling the significance of doubly nonindependent correlations. See Hayes, A. F. (1998). Within-study meta-analysis: Pooling the significance of ‘doubly nonindependent’ correlations. Psychological Methods, 3, 32-45.
This macro will compute a significance test for the difference between a set of k independent Cronbach’s alpha coefficients.
This paper describes an SPSS and SAS macro that generates all possible subscales of at least two items from an additive scale containing k items. For each possible subscale, it generates Cronbach’s alpha and the subscale-full scale correlation and displays information about each subscale in a data spread sheet. It also generates summary statistics making it easy to find the most psychometrically appealing subscale in the set as well as some item analysis statistics useful for scale construction. To download the SPSS macro, click here. For the SAS version, click here. See the paper for instructions on the use of the macro.
This macro computes Krippendorff's alpha reliability estimate for judgments made at any level of measurement, any number of judges, with or without missing data.
This macro conducts an approximate randomization test equivalent of a oneway ANOVA using F as the test statistic.
This macro conducts the Meng, Rosenthal, & Rubin test for nonindependent correlations. It is used to compare the correlation between Y and X1 and Y and X2.
This is a SPSS macro that generates a 95% confidence interval for a population correlation, quantified using Pearson’s coefficient.
RETURN TO ANDREW’S HOME PAGE