Mediation and moderation with PROCESS Models 1, 4, 7 and 14
Many proposals go beyond "does X predict Y?" to ask how or when X affects Y. Those questions are answered with mediation and moderation. Hayes's PROCESS macro made these models standard in student research (Hayes, 2022), and Sleek Data estimates four of them: Models 1, 4, 7 and 14.
Mediation and moderation in brief
A mediator (M) explains how a predictor (X) affects an outcome (Y): X changes M, which in turn changes Y. A moderator (W) changes the strength or direction of an effect, so the relationship between X and Y differs at high and low levels of W (Baron & Kenny, 1986).
The four models
Scroll sideways to see all columns.
How mediation is tested
Model 4 estimates path a (X to M), path b (M to Y, controlling for X), the direct effect c′ (X to Y, controlling for M) and the total effect c. The indirect effect is a × b.
Older guides use the causal steps of Baron and Kenny. Current practice tests the indirect effect directly with a bootstrap confidence interval (Preacher & Hayes, 2008). The data are resampled with replacement thousands of times, a × b is computed in each resample, and the middle 95% of those estimates forms a percentile interval. If the interval excludes zero, the indirect effect is supported.
For collected data, Sleek Data uses 5,000 bootstrap resamples by default, which you can set anywhere from 1,000 to 10,000, and a fixed seed so the interval reproduces exactly. Simulated studies use 1,000 resamples. Resamples in which the model cannot be estimated are skipped and counted, and they are flagged if they exceed 1% of the total.
Labels such as "full" and "partial" mediation are common in theses, but Hayes recommends reporting the effects and their intervals rather than leaning on those labels (Hayes, 2022).
How moderation is tested
Model 1 adds the product X × W to the regression. The coefficient of that product tests moderation, and ΔR² shows how much variance the interaction adds. Sleek Data mean-centres X and W by default, which makes the other coefficients easier to interpret without changing the interaction test.
A significant interaction is then probed:
- Conditional effects give the effect of X at chosen values of W. For collected data, Sleek Data uses the 16th, 50th and 84th percentiles of W, as PROCESS does. Simulated studies use the mean of W and one standard deviation either side.
- The Johnson-Neyman technique finds the value of W at which the effect of X switches between significant and non-significant, and reports the percentage of the sample on each side. If no switch happens within the observed range of W, the output says so.
For collected data, PROCESS models use HC3 heteroscedasticity-consistent standard errors by default, which protect the tests when error variance is uneven. You can choose HC0 to HC4 instead, or turn them off.
Moderated mediation: Models 7 and 14
In Model 7, W moderates path a. In Model 14, W moderates path b. The key statistic is the index of moderated mediation, which has its own bootstrap interval: if that interval excludes zero, the size of the indirect effect depends on W. Sleek Data also reports the conditional indirect effect at low, middle and high values of W, each with a bootstrap interval.
Minimum data and common errors
- Model 1 needs at least five complete observations, and Models 4, 7 and 14 need at least ten. These are technical minimums, not adequate sample sizes. Plan your N as described in the methodology chapter guide.
- Every variable in the model must be a numeric column that varies. A constant column, or variables that duplicate each other, stops the run with a message.
- Do not treat c′ on its own as the test of mediation. The decision rests on the interval for the indirect effect.
Running the models yourself
In the Data + syntax package, simulated studies include SPSS syntax with the matching PROCESS command (the PROCESS macro, version 4 or later, must be installed separately) and an R script. Collected-data packages include a Python script that reproduces the estimates. Package contents are listed on the pricing page, and the collected-data analysis page explains how to set up a run.
Common questions
Is the Baron and Kenny method still acceptable?
Many examiners still recognise it, but testing the indirect effect directly with a bootstrap confidence interval is now standard practice. If your supervisor expects the causal steps, report them as well, and base your decision on the bootstrap interval.
What does it mean if the bootstrap interval includes zero?
The indirect effect is not supported at your significance level. Report the estimate and its interval anyway, and state that the mediation hypothesis was not supported.
Should I use Model 7 or Model 14?
It depends on where your theory says the moderator acts. If it changes the effect of X on the mediator, use Model 7. If it changes the effect of the mediator on Y, use Model 14. Decide from the literature before you look at the data.
References
- 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(6), 1173–1182. https://doi.org/10.1037/0022-3514.51.6.1173
- Hayes, A. F. (2022). Introduction to mediation, moderation, and conditional process analysis: A regression-based approach (3rd ed.). Guilford Press.
- 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(3), 879–891. https://doi.org/10.3758/BRM.40.3.879