My workshop schedule on mediation and moderation analysis using PROCESS can be found on the PROCESS page.

## My Macros and Code for SPSS and SAS

On this page you will find information about many of the macros for SPSS and SAS that I have written. Most of these are described in various publications, and I recommend you read the corresponding publication before using the macro.

As with all statistical software, all attempts are made to make sure that the computations programmed into these procedures are performed correctly. When bugs are found and reported, I attempt to eliminate them as quickly as possible. I offer this procedures to the research community "as is" and accept no responsibility for any negative consequences that might result from their use.

As with all statistical software, all attempts are made to make sure that the computations programmed into these procedures are performed correctly. When bugs are found and reported, I attempt to eliminate them as quickly as possible. I offer this procedures to the research community "as is" and accept no responsibility for any negative consequences that might result from their use.

__PROCESS__PROCESS can be found at www.processmacro.org

Twitter: #processmacro

Facebook: www.facebook.com/processmacro

__MEMORE__

(

__ME__diation and

__MO__deration in

__RE__peated-measures designs)

**Montoya, A. K., & Hayes, A. F. (2017). Two condition within-participant statistical mediation analysis: A path-analytic framework.**

**[PDF][email for a copy]**

*Psychological Methods*,*22*, 6-27.MEMORE is a macro for SPSS and SAS that estimates the total, direct, and indirect effects of

*X*on

*Y*through one or more mediators

*M*in the two-condition or two-occasion within-subjects/repeated measures design. In a path-analytic form using OLS regression, it implements the method described by Judd, Kenny, and McClelland (2001,

*Psychological Methods*), extended to multiple mediators. Along with an estimate of the indirect effect(s), MEMORE generates confidence intervals for inference about the indirect effect(s) using bootstrapping, Monte Carlo, or normal theory approaches. MEMORE also provides an option that conducts pairwise contrasts between specific indirect effects in models with multiple mediators.

Moderation functions have not yet been implemented in MEMORE.

**Download MEMORE from Amanda Montoya's web page.**

Here is a direct link to the MEMORE files.

If you have questions about the use of MEMORE, email Amanda Montoya (montoya.29@osu.edu)

**RLM****Darlington, R. B. & Hayes, A. F. (2017).**

*Regression analysis and linear models: Concepts, application, and implementation*. New York: The Guilford Press [purchase]The RLM macro was released with the publication of

*Regression Analysis and Linear Models*in the summer of 2016. It can be downloaded from the book's web page and is documented in Appendix A of the book. Available for SPSS and SAS, RLM is a supplement to SAS and SPSS's regression modules. In addition to the usual regression program output, it has options for heteroscedasticity-consistent inference (using either the HC0, HC1, HC2, HC3, or HC4 variance-covariance matrix), automatic coding of a multicategorical categorical regressor, options for estimating and probing interactions involving a multicategorical regressor, all subsets regression, spline regression, crossvalidation indices for the multiple correlation, an implementation of a limited form of dominance analysis, contrasts between regression coefficients, and a few other features.

**MLMED****Rockwood, N. J. & Hayes, A. F. (2017, May).**

*MLmed: An SPSS macro for multilevel mediation and conditional process analysis.*Poster presented at the annual meeting of the Association of Psychological Science (APS), Boston, MA. [PDF]MLMED is an SPSS macro that conducts multilevel mediation and conditional process analysis. Stay tuned for a paper or tutorial describing its use and application in 2018. For now, you can learn about MLMED by downloading the documentation and Nick Rockwood's MA thesis at www.njrockwood.com

**OGRS****Hayes, A. F., & Montoya, A. K. (2017). A tutorial on estimating, visualizing and probing an interaction involving a multicategorical independent variable in linear regression analysis.**[PDF]

*Communication Methods and Measures, 11*, 1-30OGRS (Omnibus Groups Regions of Significance) is a macro for SPSS and SAS that implements the Johnson-Neyman technique (via iterative approximation) for probing an interaction when the independent variable is multicategorical (i.e., three or more groups) and the moderator is continuous. It was written by Amanda Montoya and is described, tested, and documented in Montoya (2016). The paper referenced above illustrates its use.

**Download OGRS from Amanda Montoya's web page.**

Here is a direct link to the OGRS files.

If you have questions about the use of OGRS, email Amanda Montoya (montoya.29@osu.edu)

__INDIRECT, SOBEL, MEDIATE, MODMED, and MODPROBE__

These macros are all obsolete with the release of PROCESS, which can do pretty much everything that these five macros can do and a whole lot more. PROCESS can be found at www.processmacro.org and is documented in

*Introduction to Mediation, Moderation, and Conditional Process Analysis*

If you still want to use one of these macros, they can be downloaded in one archive right here. The archive contains five folders, one for each macro. I no longer support or respond to questions about these macros.

__MEDCURVE__

Hayes, A. F., & Preacher, K. J. (2010). Quantifying and testing indirect effects in simple mediation models when the constituent paths are nonlinear.

*Multivariate Behavioral Research, 45*, 627-660. [PDF]

This macro for SPSS and SAS estimates instantaneous indirect effects in simple mediation models with nonlinear paths, as discussed in Hayes and Preacher (2010), and produces bootstrap confidence intervals for inference. The X->M, M|X->Y, and X|M->Y paths can be estimated as linear, quadratic, exponential, log, or inverse, in any combination, thereby allowing for the estimation of 125 different models.

Download MEDCURVE: medcurve.zip

Note: There is an error in the equation for Y-hat at the bottom of page 640 of Preacher and Hayes (2010). This equation should read Y-hat = -2.0823 + 1.1197(X) - 0.1292(X*X) + 0.7896(M). This does not affect any of the computations anywhere in the manuscript.

__MEDTHREE and MED3C__

Hayes, A. F., Preacher, K. J., & Myers, T. A. (2010). Mediation and the estimation of indirect effects in political communication research. In E. P. Bucy & R. Lance Holbert (Eds), Sourcebook for political communication research: Methods, measures, and analytical techniques. New York: Routledge. [at the publisher's page]

MEDTHREE and MED3C have been discontinued. PROCESS is capable of doing everything these can do and PROCESS provides much more detailed output and many more options. MEDTHREE and MED3C are thus obsolete. For a discussion of the serial mediation model described in this book chapter, see Hayes (2018).

__HCREG__

**Hayes, A. F., & Cai, L. (2007). Using heteroscedasticity-consistent standard error estimators in OLS regression: An introduction and software implementation.**

*Behavior Research Methods, 39*, 709-722.[PDF]

This macro for SPSS and SAS is used for estimating OLS regression models but with heteroscedasticity-consistent standard errors using the HC0, HC1, HC2, HC3, and HC4 procedures described by MacKinnon and White (1985), Long and Ervin (2000), and Cribari-Neto (2004).

**NOTE:**This macro is obsolete with the release of RLM, which is available for both SPSS and SAS and implements the HC0, HC1, HC2, HC3, and HC4 standard error estimators discussed in this article. RLM is documented in Darlington and Hayes (2017). Unlike HCREG, RLM can also estimate and probe interactions involving a multicategorical variable.

Download HCREG: hcreg.zip

Documentation: see the Appendix of the article

__KALPHA__

Hayes, A. F., & Krippendorff, K. (2007). Answering the call for a standard reliability measure for coding data.

*Communication Methods and Measures, 1*, 77-89. [PDF]

This macro computes Krippendorff's alpha reliability estimate for subjective judgments made at any level of measurement, any number of judges, with or without missing data.

Download KALPHA: kalpha.zip

Here is a document that describes the bootstrapping algorithm.

__HETREG__

Cai, L., & Hayes, A. F. (2007). A new test of linear hypotheses under heteroscedasticity of unknown form.

*Journal of Educational and Behavioral Statistics, 33*, 21-40. [PDF]

This SAS macro implements 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).

Documentation: See Appendix B of the article.

Macro: hetreg.sas

__ALPHAMAX__

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.

**MCMED**This macro, available for SPSS and SAS, constructs a Monte Carlo confidence interval for the indirect effect in statistical mediation analysis. Its use is described in Appendix C of

*Introduction to Mediation, Moderation, and Conditional Process Analysis*. You can obtain MCMED by downloading PROCESS from www.processmacro.org