Multilevel Mediation in SPSS

About MLmed

MLmed is a computational macro for SPSS that simplifies the fitting of multilevel mediation and moderated mediation models, including models containing more than one mediator. After the model specification, the macro automatically performs all of the tedious data management necessary prior to fitting the model. This includes within-group centering of lower-level predictor variables, creating new variables containing the group means of lower-level predictor variables, and stacking the data as outlined in Bauer, Preacher, and Gil (2006) and their supplementary material to allow for the simultaneous estimation of all parameters in the model.

The output is conveniently separated by equation, which includes a further separation of between-group and within-group effects. Further, indirect effects, including Monte Carlo confidence intervals around these effects, are automatically provided. The index of moderated mediation (Hayes, 2015) is also provided for models involving level-2 moderators of the indirect effect(s). 

Users interested in detailed explanations of the models fit using MLmed, as well as example analyses, may find Chapters 5-6 of my Thesis helpful (full citation below). Note that the User Guide provided within the MLmed download and the link above is more current and thorough than the documentation provided in the appendix of my thesis. 

Rockwood, N. J. (2017). Advancing the formulation and testing of mul- tilevel mediation and moderated mediation models (Unpublished master’s thesis). The Ohio State University, Columbus, OH.


May, 2019 - MLmed Beta 2 now available. It can be downloaded using the link above. The .zip file contains both the MLmed macro (syntax and point-and-click) and the User Guide, which documents the changes made in the new version (including the ability to add a level-2 moderator of the within- and/or between-group direct effect).

Please report any bugs found through email ( so I can try to fix them ASAP. Include the SPSS Version number, Operating System, and whether the error occurred using the syntax version or point-and-click version when reporting a bug. Also, do not hesitate to email for help. I will respond to emails as time permits. Follow on twitter (@njrockwood) to stay up to date on the latest developments of MLmed.

Multilevel mediation and conditional process modeling, as well as MLmed, are discussed within the following book chapter and journal article:

Rockwood, N. J. & Hayes, A. F. (in press). Multilevel mediation analysis. To appear in A. A. O’Connell, D. B. McCoach, & B. Bell (Eds.), Multilevel Modeling Methods with Introductory and Advanced Applications. Charlotte, NC: Information Age Publishing.

Hayes, A. F. & Rockwood, N. J. (in press). Conditional process analysis: Concepts, computation, and advances in the modeling of the contingencies of mechanisms. American Behavioral Scientist (ABS). [link to preprint]

The macro was also presented at the 2017 APS conference:

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]Follw on