Moderation and mediation
Two questions that ordinary regression does not answer. Moderation – does the relationship between X and Y change according to a third variable: does stress harm well-being less in people who have social support? Mediation – through what does X affect Y: does stress harm well-being because it increases rumination? The page runs the four common PROCESS-style models: moderation with simple slopes and Johnson-Neyman (Model 1), simple and parallel mediation with bootstrap (Model 4), and first- or second-stage moderated mediation (Models 7 and 14). Following Hayes (2022), Field (2024, chapter 11) and Cohen, Cohen, West and Aiken (2003, chapters 7 and 12).
Loading the data
Paste columns directly from the sheet (including the header row) – select them in Excel, copy, and paste here:
Model and variables
Moderation or mediation?
Two different questions about a third variable. Moderation – a third variable changes the relationship between two others: "a moderator variable is one that affects the relationship between two others" (Field, 2024, Section 11.3.1). The relationship can weaken, strengthen or reverse – "it is not necessary for there to be an effect in one group and not in the other" (ibid.). In a diagram, the moderator is an arrow pointing at an arrow (Cohen et al., 2003, p. 458). Mediation – a third variable explains the relationship: X affects M, and M affects Y (Field, 2024, Section 11.4.1). Mediators are the variables that "carry the influence" (Cohen et al., 2003, p. 477).
In the page's example – 240 fictitious students – both questions can be asked of the same data: does social support moderate the harm of academic stress to mental well-being (Model 1)? And does stress harm well-being through rumination and sleep (Model 4)? Models 7 and 14 combine the two: does support change the indirect effect – at the first stage (stress → rumination) or at the second (sleep → well-being)?
The moderation model (Model 1)
Y is predicted from X, from W and from their product: Ŷ = b0 + b1X + b2W + b3XW (Field, 2024, Equation 11.3; Cohen et al., 2003, Equation 7.1.2). The product is the interaction – "literally the two variables multiplied together" (Field, 2024, Section 11.3.4) – and if b3 is significant, there is moderation. X and W must be in the model alongside the product: b3 represents the interaction "if and only if" both variables are included in the equation (Cohen et al., 2003, p. 284; Field, 2024, Section 11.3.2).
How much does the interaction add? ΔR² – the difference in R² between the model with the product and the model without it, with an F test for the increment (Cohen et al., 2003, p. 275). Interactions usually add "only a few percent" of variance, and large interactions are "rare" in observational studies (p. 297) – so an increment of 2%-5% is not negligible. The F test for the increment equals the t² of b3 with ordinary standard errors.
Mean-centering
When there is a product in the model, b1 is the effect of X when W = 0 (Cohen et al., 2003, p. 260; Field, 2024, Section 11.3.3) – and zero is often an impossible value: age zero, heart rate zero, support zero on a 1-7 scale. Mean-centering – subtracting the mean from each value – turns b1 into the effect of X when W is at its mean, and also into the "average regression" of Y on X across W (Cohen et al., 2003, pp. 261-262; Field, 2024, Section 11.3.3). Centering "has no effect on the coefficient of the highest-order term" (Cohen et al., 2003, p. 266) – b3, the interaction test and the simple slopes are identical with and without centering (p. 271). The recommendation: center the continuous variables in the product (p. 266; Field, 2024, Section 11.3.3), unless zero is meaningful. Y does not need to be centered (Cohen et al., 2003, p. 266).
Hayes (2022, section 9.1) stresses the other side: the claim that one must center in order to "overcome multicollinearity" is a "myth" (pp. 320-321). Centering does reduce the correlation between X and the product, but the standard error of b3, the t and the p do not change at all (pp. 324-325). In other words – both are true: centering does not change the moderation test, but it makes b1 and b2 meaningful; Hayes recommends justifying it this way, and only when without it the coefficients are meaningless (p. 328).
On the page – three options, as in PROCESS: only the continuous variables in the product (center=2; the page's default, and Field's choice – section 11.3.6), all of them (center=1), or none – the default of PROCESS itself (Hayes, 2022, pp. 328-329, 602). A dichotomous variable is not centered under the first option, because its values are meaningful. W values in the output are always shown on the original scale.
Simple slopes and Johnson-Neyman
A significant interaction says that the relationship changes, but not how. Simple slopes: plug in a value of W and obtain the regression line of Y on X at that value, Ŷ = (b1 + b3W)X + (b2W + b0) – the slope θ = b1 + b3W (Cohen et al., 2003, Equation 7.3.1, p. 270). Its standard error – from the covariance matrix of the coefficients: SE = √(s²b1 + 2W·covb1b3 + W²·s²b3), with t on n − k − 1 degrees of freedom (Equations 7.4.2 and 7.4.4, p. 273). The page is verified against the printed example there (Table 7.4.1, p. 276).
At which values? Cohen et al. (2003, p. 269) recommend the mean and ±1 standard deviation, or meaningful values, such as clinical cutoff points; Field (2024, section 11.3.5) also writes that this is "common". Hayes instead recommends the 16th, 50th and 84th percentiles – the PROCESS default: "if W is highly skewed", a standard deviation below or above the mean may fall outside the scale, whereas the percentiles are "always within the range of the data", and in a normal distribution they are exactly the mean and ±1 standard deviation (2022, pp. 259, 265-266, 268). The name "pick-a-point" – Rogosa (1980, as cited in Bauer & Curran, 2005, p. 374), who note that the values are "chosen rather arbitrarily". On the page you can choose; when the mean and ±1 standard deviation are chosen, a value that falls outside the data is replaced by the minimum or the maximum, as in PROCESS (Hayes, 2022, p. 268). Hayes does not define how PROCESS computes the percentiles; on the page – R's type 6 (site convention). PROCESS also shows the simple slopes only when the interaction is significant at the .10 level (p. 599); the page always shows them.
Johnson-Neyman (Johnson & Neyman, 1936, as cited in Bauer & Curran, 2005) – instead of three values, all values: which values of W make the effect of X significant? The boundaries are the values at which the t of the simple slope equals exactly the critical value – t²crit·SE²(W) − (b1 + b3W)² = 0, a quadratic equation in W solved with the quadratic formula (Bauer & Curran, 2005, Equations 16-21, p. 380; Hayes, 2022, p. 270). There may be two boundaries, one or none within the range of the data (Hayes, 2022, pp. 270-271); Field describes only the case of two boundaries, between which the effect is not significant (2024, section 11.3.5), and in the page's example there is one boundary. Roots outside the range "should be ignored" (Hayes, 2022, p. 270); Cohen et al. likewise recommend interpreting a regression "only within the range of the observed data" (2003, p. 282). Therefore the page reports only boundaries within the range of W, and the percentage of participants on each side, as PROCESS does (Hayes, 2022, p. 271). When one side of the boundary has few participants, Hayes "would be hesitant" to infer much from that region (p. 275). One more caveat: the test is done at each value of W separately, not for all values together; Bauer and Curran therefore see the regions as being of "primarily heuristic value" (2005, p. 383), and a simultaneous correction (Potthoff, 1964, as cited there) is not in PROCESS (Hayes, 2022, p. 271, Note 6) and is not on the page.
The mediation model (Model 4)
Two equations (or more, if there are several mediators), each a separate regression: M = i1 + aX, and Y = i2 + c'X + bM. a – the effect of X on M; b – of M on Y holding X constant; c' – the direct effect of X on Y; and the product ab – the indirect effect (Field, 2024, Sections 11.4.1-11.4.3, Equation 11.6). "By the tracing rule, indirect effects are estimated as products of direct effects", and they can be summed (Cohen et al., 2003, p. 462). The total effect c – the coefficient of X when Y is predicted from X alone – equals exactly the direct plus the indirect effect, c = c' + ab (p. 463, Equation 12.2.1; p. 465; Hayes, 2022, Section 3.2). In OLS the identity holds "always, in any data set" (Hayes, 2022, p. 95; p. 87), as long as the control variables are in both the M equation and the Y equation (p. 136) and the equations are on the same participants – which is why the page deletes participants with missing data from all the equations together.
Several mediators in parallel (Field, 2024, Section 11.4.7): each mediator has its own aj and bj, and its own indirect effect ajbj; the sum is the total indirect effect. The mediators are related to each other ("a double-headed arrow", ibid.), and bj is the effect of each mediator controlling for the others. The page adds the differences between the indirect effects – is the path through rumination stronger than the path through sleep – with their own bootstrap interval, like contrast=1 in PROCESS (Hayes, 2022, pp. 176-178, 591; Preacher & Hayes, 2008, p. 884). Mediators on different scales may also be compared, because the indirect effects are in units of X and Y (Hayes, 2022, p. 176). But the difference is a difference in "strength" only when both indirect effects have the same sign (p. 178). One model with all the mediators is preferable to several separate models: each indirect effect in it controls for the others, and thus "the likelihood of bias is reduced" due to omitted variables (Preacher & Hayes, 2008, p. 881).
How is the indirect effect tested?
The old way – the four conditions of Baron and Kenny (1986, as cited in Field, 2024, section 11.4.2): X predicts Y, X predicts M, M predicts Y, and the effect of X "is reduced" when M is added. Field explains that the problem lies in the fourth condition – how much reduction is enough? – and the practice of looking for a shift from significant to nonsignificant "leads to all sorts of nonsense" (ibid.). Hayes (2022, section 4.1) adds that a significant total effect is not needed at all: "an indirect effect can be different from zero even when the total effect is not" (p. 123; likewise Preacher & Hayes, 2008, p. 880). Cohen et al. (2003, p. 467) test only the paths themselves, and give no standard error for the indirect effect.
The Sobel test (Sobel, 1982, as cited in Hayes, 2022, Section 3.4) – z = ab/SE. The page uses the "second-order" standard error, SE = √(a²s²b + b²s²a + s²as²b) (Hayes, 2022, Equation 3.7, p. 97) – the one PROCESS computes (p. 590). Preacher and Hayes (2008, pp. 880, 882) present the first-order version, without the last term, and note that the difference is "usually negligible". The test assumes that the product ab is normally distributed, but its distribution is "irregular" in ordinary samples, and its power is among the lowest – Hayes: "I recommend that you avoid this approach" (2022, p. 99). The page shows it for comparison only.
Bootstrap – the approach of Field and of PROCESS (sections 11.4.4-11.4.6): draw from the data, with replacement, a sample of the same size; re-estimate all the equations and ab; repeat 5,000 times; sort the estimates; and the 95% confidence interval consists of the values at positions 0.005k(100 − ci) and k[1 − 0.005(100 − ci)] + 1 – with 5,000 samples, the 125th and the 4,876th (Hayes, 2022, pp. 100, 102). This is the percentile interval, the PROCESS default; 5,000-10,000 samples "are sufficient in most applications" (p. 105). "If the confidence interval contains zero – we tend to assume there is no mediation" (Field, 2024, Section 11.4.6). An estimate with a confidence interval is preferable to Baron and Kenny and to Sobel, because "it is harder to fall into black-and-white thinking" (section 11.4.2). The number of samples can be changed (200 to 20,000); when the position is not a whole number, the page rounds the lower one down and the upper one up (site convention).
Percentile or bias-corrected? The sources say both: Preacher and Hayes (2008, p. 886) recommended a bias-corrected interval; Hayes (2022, p. 109) writes later that the correction "can slightly inflate" the Type I error when one of the paths is zero, and that the percentile interval has become "the more recommended method". BCa intervals "are not available in PROCESS and never have been" (p. 104). The page computes a percentile interval.
The seed: the same seed – the same samples. Without a fixed seed, "you will get slightly different values" on each run (Field, 2024, Section 11.4.5, Note 13), and Hayes recommends always setting a seed and reporting it (2022, pp. 106-107). The seed appears in the output and in the R script, which uses the same R generator – so the downloaded script gives exactly the same intervals. In PROCESS for SPSS or SAS the same seed gives different samples, because the generator is different (Hayes, 2022, p. 106). The page's default is seed 42, as in the examples in the guide; "New seed" gives a different seed, and the bootstrap intervals change by a few thousandths.
Effect size of the indirect effect
The indirect effect ab is "an unstandardized regression coefficient like any other" – in units of Y per unit of X (Field, 2024, Section 11.4.3). Two standardizations: partially standardized – ab/sY: how many standard deviations of Y per unit of X (Hayes, 2022, Table 4.2, p. 148; MacKinnon, 2008, as cited in Field, 2024, Equation 11.7). Completely standardized – ab·sX/sY (Hayes, 2022, p. 116; Field, 2024, Equation 11.8), "the index of mediation", which can be compared across models and included in a meta-analysis; Field reports it in the example, β = 0.04 (section 11.4.6). When X is dichotomous, Hayes recommends "avoiding" the completely standardized one and reporting the partially standardized one (2022, p. 148), and PROCESS does not compute it (p. 145) – nor does the page. Other measures, such as the "proportion mediated" ab/c, Hayes rejects: they are not bounded and are not stable in samples of ordinary size (pp. 149-151).
Moderated mediation (Models 7 and 14)
Sometimes the question is whether the mechanism depends on a third variable. Model 7 – W moderates the first path: M = i1 + a1X + a2W + a3XW, so the indirect effect at a given value of W is (a1 + a3W)·b. Model 14 – W moderates the second path: Y = i2 + c'X + b1M + b2W + b3MW, and the indirect effect is a·(b1 + b3W). (Hayes, 2022, Equations 12.6-12.8, pp. 468-469, and Equation 11.13, p. 434). In both models the direct effect c' is not moderated (pp. 419, 480); in Model 7, W enters the M equation only, and in Model 14 – the Y equation. The indirect effect is a straight line in W, and its slope – a3b or ab3 – is the index of moderated mediation (Hayes, 2015, as cited in Hayes, 2022, pp. 440, 476): how much the indirect effect changes when W increases by one unit. The bootstrap interval of the index is the formal test: if it does not include zero – the indirect effect depends on W (p. 441). The same interval also tests the difference between any two conditional indirect effects, because the difference is the index times the difference between the W values (p. 449). Centering does not change the conditional indirect effects (p. 426, note 1).
Two remarks. First, "the indirect effect is significant at a low W value and not at a high one" is not proof of moderated mediation – the difference between two indirect effects is what needs to be tested, and that is the index. The Model 14 example is exactly like this: the indirect effect through sleep is significant at low and medium support and not at high support, but the confidence interval of the index includes zero. Hayes says so explicitly: "it doesn't matter" whether the interaction in one of the paths is significant; "what matters is whether the index of moderated mediation is different from zero" (2022, p. 441; see also p. 468). Second, the absence of an overall indirect effect says nothing about whether it is moderated (p. 441). The page is verified against an independent computation in R.
Robust standard errors
All the equations are estimated by OLS, and by default – with heteroscedasticity-robust standard errors, HC4. Field recommends choosing HC4 "and bask in the relief of not having to think about the assumption any more" (2024, section 11.3.6; likewise for mediation, sections 11.4.4 and 11.4.7). Hayes does not recommend one of them; PROCESS offers HC0 to HC4 (hc=0 to hc=4), and by default – ordinary standard errors (Hayes, 2022, p. 608; Hayes & Cai, 2007, as cited there). On the page you can choose HC3 or ordinary standard errors. Robust standard errors change t, p, the confidence intervals of the coefficients and the simple slopes and Johnson-Neyman, and the model's F test becomes a Wald test – but not the estimates, and not the bootstrap intervals of the indirect effects. The difference can be substantial: in Field's mediation example the direct effect is "still significant" with ordinary standard errors (section 11.4.2), and is not significant with HC4, p = .079 (section 11.4.5).
How to read the output?
Model 1. Table 1 – model size and the increment of the interaction (ΔR² with F). Table 2 – the coefficients: b3 is the moderation test; b1 and b2 – conditional effects (at the mean of the other variable, if centered). Table 3 – the simple slopes. After it – Johnson-Neyman (a sentence, a figure and a detailed table) and the interaction plot. In the example (238 participants with complete data, HC4): the stress × support interaction is significant, b = 0.28, t(234) = 3.44, p < .001, and adds ΔR² = .046. Stress harms well-being less the higher the support: θ = −1.14 at support 3.21 (16th percentile), −0.80 at 4.42 and −0.45 at 5.68 (84th percentile). The Johnson-Neyman boundary – support 6.18: above it, for 7.1% of the participants, the effect of stress is no longer significant.
Model 4. The equations table – a for each mediator, b and c', and the total model. After it – the total and direct effects, the indirect effects with bootstrap intervals, the effect size, Sobel (collapsed) and the path diagram. In the example (rumination and sleep in parallel, seed 42): the indirect effect through rumination −0.29, 95% CI [−0.43, −0.17], through sleep −0.14 [−0.22, −0.06], and together −0.42 – more than half of the total effect, c = −0.75; the direct effect c' = −0.32 is still significant – partial mediation.
Models 7 and 14. The equations table, the conditional indirect effects at three values of W, and the index of moderated mediation. In the example (seed 42): in Model 7 (rumination as mediator) support weakens the relationship between stress and rumination, and the index 0.073 [0.028, 0.122] does not include zero – the indirect effect weakens from −0.38 to −0.20. In Model 14 (sleep as mediator) the index 0.051 [−0.005, 0.119] includes zero – there is no evidence of moderated mediation, even though the conditional indirect effect at high support is not significant and the others are.
Assumptions and warnings
Causality. A significant interaction "does not justify" a causal assumption, and "the moderator is simply a predictor by another name" – the roles of X and W can be swapped in the same model (Field, 2024, Box 11.1). Mediation is explicitly a causal claim: X precedes M, M precedes Y, and there is no unmeasured common cause. The conditions for causal inference – association, temporal precedence and ruling out competing explanations (Cohen et al., 2003, pp. 454-455); the unmeasured causes must be uncorrelated with the measured ones (p. 460). The data can only show "consistency" with the model, not prove it (p. 79), and there are usually alternative models that fit the data equally well (p. 475). In cross-sectional data – as in the example – the assumption about temporal order is an assumption, not a finding (p. 477).
Measurement. Measurement error in the mediator biases the effects (Cohen et al., 2003, p. 475); and the reliability of the product is lower than the reliability of each variable – roughly the product of the reliabilities, for example .8 × .8 = .64 (p. 297) – so the power to detect an interaction is low. A medium-sized interaction requires 55 participants with perfect measurement, and 100-150 or more with a reliability of .88 (p. 297).
Linear model. Each equation is an ordinary linear regression, with all its assumptions – linearity, independent observations, residuals without extreme outliers. Robust standard errors solve only the equality of variances. A dichotomous Y or M requires logistic regression (PROCESS does this), and the page does not compute it – it issues a warning. A categorical moderator with more than two groups requires dummy coding (Cohen et al., 2003, Section 9.3), and the page treats it as continuous.
What this page does not compute. Other PROCESS models (serial mediation, double moderation, moderation of the direct effect), three-way interactions (Cohen et al., 2003, Section 7.8), an interaction with a quadratic term (section 7.9), a categorical moderator or predictor with more than two groups, and BCa bootstrap intervals. For mediation in a more complex path model (with ML estimation and fit indices) – the page "Path analysis and mediation"; for mediation between latent factors – "Latent mediation"; for ordinary regression – "Linear regression".
And how do you do it in SPSS?
The convenient way – PROCESS, a free macro by Andrew Hayes that adds an Analyze › Regression › PROCESS menu to SPSS; installation is explained in Field (2024, section 4.13.1), and the full command guide – in Appendix A of Hayes (2022, pp. 579-650). Select Y, X, W or M and a model number; under options – HC4, centering of "only continuous variables that define products", Johnson-Neyman, and W values (sections 11.3.6, 11.4.4). Two traps (SPSS Tip 11.1): PROCESS requires names of up to 8 characters, and similar long names are truncated to the same name; and string variables "confuse" it. The page's syntax builds the products with COMPUTE and runs REGRESSION for each equation – this also runs in PSPP, the free software, and gives the page's coefficients (with ordinary standard errors); the PROCESS command appears in a comment, with the options from Appendix A (model, center, hc, jn, boot, seed; Hayes, 2022, pp. 581-582); we did not run it – we do not have SPSS. The menu paths are general information about the software.
And how do you do it in R?
No special package is needed: lm for each equation, vcovHC from the sandwich package for HC3 and HC4 errors, and a simple loop for the bootstrap. The simple slopes and Johnson-Neyman – from the formulas above, with the covariance matrix of the coefficients. The script the page downloads does all of this for your data and the model you chose, with the same seed and the same generator – that is, exactly the same confidence intervals. The script below was run as is on the English sample file (R 4.3.3), and the values in the comments are identical to the page. The site rule for comments in R: a UTF-8 file, every comment line starts with an English word, and variable names in English.
# Moderation and mediation – Professor Stat. This file is saved as UTF-8; every comment line starts with an English word
library(readxl) # Reading Excel
library(sandwich) # Robust standard errors (install.packages("sandwich"))
# Loading: the "Data" sheet in the English sample file
d0 <- as.data.frame(read_excel("C:/Rdata/DATA_mod_example_eng.xlsx", sheet = "Data"))
# ===== Model 1: does support (W) moderate the relationship between stress (X) and well-being (Y)? =====
# Listwise deletion on the model variables only, as on the page
d <- d0[complete.cases(d0[, c("stress", "support", "wellbeing")]), ]; nrow(d)
# Result: 238
# Centering and the product
d$x <- d$stress - mean(d$stress); d$w <- d$support - mean(d$support); d$xw <- d$x * d$w
f <- lm(wellbeing ~ x + w + xw, data = d)
V <- vcovHC(f, type = "HC4") # HC4 errors, as in PROCESS with hc=4
round(cbind(b = coef(f), SE = sqrt(diag(V)), t = coef(f) / sqrt(diag(V))), 3)
# Result: stress b = -0.794 (when support is at its mean), the interaction b = 0.280, SE = 0.081, t = 3.44
r <- lm(wellbeing ~ x + w, data = d); anova(r, f) # Increment of the interaction (ordinary errors)
summary(f)$r.squared - summary(r)$r.squared
# Result: F(1, 234) = 15.29 and ΔR² = .046
# Simple slopes at the 16th, 50th, 84th percentiles of W
wv <- quantile(d$support, c(.16, .50, .84), type = 6) - mean(d$support)
th <- coef(f)["x"] + coef(f)["xw"] * wv
se <- sqrt(V["x", "x"] + 2 * wv * V["x", "xw"] + wv^2 * V["xw", "xw"])
round(cbind(W = wv + mean(d$support), effect = th, se = se, t = th / se), 3)
# Result: at W = 3.214, 4.415, 5.675 the effect of stress is -1.139, -0.803, -0.450 – stress harms less when there is more support
# Johnson-Neyman: the values of W at which the t of the effect equals exactly the critical value
tc <- qt(.975, df.residual(f)); b <- coef(f)
a2 <- b["xw"]^2 - tc^2 * V["xw", "xw"]; a1 <- 2 * (b["x"] * b["xw"] - tc^2 * V["x", "xw"]); a0 <- b["x"]^2 - tc^2 * V["x", "x"]
sort(Re(polyroot(c(a0, a1, a2)))) + mean(d$support)
# Result: 6.181 and 10.981; the upper boundary is outside the data range, so only 6.181 counts – above it the effect is not significant
# ===== Model 4: do rumination and sleep mediate the relationship between stress and well-being? =====
d <- d0[complete.cases(d0[, c("stress", "rumination", "sleep", "wellbeing")]), ]; nrow(d)
# Result: 238
X <- d$stress; Y <- d$wellbeing; M <- as.matrix(d[, c("rumination", "sleep")]); n <- nrow(d)
fitb <- function(Xm, y) as.numeric(solve(crossprod(Xm), crossprod(Xm, y)))
eff <- function(i) { # The indirect effects in sample i
a <- sapply(1:2, function(j) fitb(cbind(1, X[i]), M[i, j])[2])
bb <- fitb(cbind(1, X[i], M[i, ]), Y[i])[3:4]
c(rumination = a[1] * bb[1], sleep = a[2] * bb[2], total = sum(a * bb))
}
round(eff(1:n), 3)
# Result: -0.287, -0.136, -0.423
set.seed(42) # Same seed as on the page – same samples
bs <- t(sapply(1:5000, function(r) eff(sample.int(n, n, replace = TRUE))))
# Percentile interval as in PROCESS: the 125th and 4,876th of 5,000 sorted values (Hayes, 2022, p. 100)
round(apply(bs, 2, function(v) sort(v)[c(125, 4876)]), 3)
# Result: [-0.432, -0.172], [-0.218, -0.062], [-0.570, -0.293] – both mediators are significant
Reporting the results
Hayes (2022, section 14.2) recommends: use statistics as "punctuation" for claims and not as the main point (p. 539); report both the direct and the indirect effect, each with a test (p. 543); say "the indirect effect of X" and not "the mediated effect"; state the number of samples, the type of interval and the seed (pp. 543, 549); and in moderation and moderated mediation – the conditional effect function, the W values, the centering and the coding (pp. 548-549). "Standardized" coefficients in a model with a product – never (p. 549). Field suggests reporting moderation in a table of the coefficients – b with a confidence interval, SE, t and p – and citing the PROCESS version and Hayes (Field, 2024, Section 11.3.8, Table 11.1); and mediation – at least the indirect effect with the bootstrap interval and the effect size, and preferably also a diagram with the coefficients (section 11.4.6, Figure 11.12). APA (2020, section 6.43) asks for "sufficient information for the reader to corroborate the analyses": for moderation – whether the variables were centered, at which W values the slopes were probed, and the type of standard errors; for mediation – the number of bootstrap samples, the type of interval (percentile) and the seed. The formatting rules (section 6.36): p without a zero before the decimal point; b, t and F – with it. The results paragraph in the output is built this way, in English.
Common mistakes
Splitting a continuous variable into two groups. A median split of one predictor reduces r² to .64 of its value – "like throwing away more than a third of the participants" – and of two predictors may create spurious effects and a spurious interaction. "We strongly recommend against it" (Cohen et al., 2003, p. 256).
A product without the variables themselves. Without X and W in the model, the coefficient of the product is not the interaction (Cohen et al., 2003, p. 284; Field, 2024, Section 11.3.2).
Interpreting b1 as the "main effect" without centering. It is the effect of X when W = 0 – perhaps a value that does not exist (Cohen et al., 2003, pp. 260-261).
The software's "standardized coefficient" of the product. It is the standard score of the product, not the product of the standard scores – it "should be ignored" (Cohen et al., 2003, p. 283). The correct standardized solution – standardize X and W, multiply, and run (ibid.).
Interpreting outside the data. A simple slope or a Johnson-Neyman boundary at a value of W that is not in the data – or that has very few participants – is an inference beyond the data (Cohen et al., 2003, p. 282).
Looking for mediation in a "drop in significance". Comparing the p of c with the p of c' instead of testing the indirect effect itself (Field, 2024, Section 11.4.2).
Inferring moderated mediation from "significant here and not significant there". Test the index of moderated mediation – see the Model 14 example.
Presenting mediation in cross-sectional data as a causal finding. The analysis shows that the data are consistent with the mechanism, not that it exists (Cohen et al., 2003, p. 79).
References
American Psychological Association. (2020). Publication manual of the American Psychological Association (7th ed.). https://doi.org/10.1037/0000165-000
Bauer, D. J., & Curran, P. J. (2005). Probing interactions in fixed and multilevel regression: Inferential and graphical techniques. Multivariate Behavioral Research, 40(3), 373-400. https://doi.org/10.1207/s15327906mbr4003_5
Cohen, J., Cohen, P., West, S. G., & Aiken, L. S. (2003). Applied multiple regression/correlation analysis for the behavioral sciences (3rd ed.). Lawrence Erlbaum Associates.
Field, A. (2024). Discovering statistics using IBM SPSS statistics (6th ed.). Sage.
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
Baron and Kenny (1986) and MacKinnon (2008) – as cited in Field (2024); Sobel (1982), Hayes (2015) and Hayes and Cai (2007) – in Hayes (2022); Johnson and Neyman (1936), Rogosa (1980) and Potthoff (1964) – in Bauer and Curran (2005). Under the site rule, the reference list includes only sources that were read in the original. Field is cited by section, equation and table (the e-book does not preserve the printed page numbers); the rest – by printed page. Read: chapter 11 of Field; chapters 7, 9.3 and 12 of Cohen et al.; chapters 1-5, 7-9, 11-12 and 14 and Appendix A of Hayes; and both articles in full. The page's computation is verified against R 4.3.3 (lm, sandwich, and bootstrap with the same generator), against Table 7.4.1 of Cohen et al. (the simple slopes, standard errors and confidence intervals), and against the salary example of chapter 12, from the raw data in Table 3.5.1.
Errors we found in the sources. Field (2024): the confidence interval of the indirect effect is reported as [0.02, 0.27] (section 11.4.6 and Figure 11.12), but in Output 11.9 the lower bound is .0023 – that is, [0.00, 0.27]; and the lower bound of the index of mediation is printed as 0.007 instead of 0.001 (section 11.4.5). Field calls the intervals "BCa", but BCa intervals "are not available in PROCESS and never have been" (Hayes, 2022, p. 104) – these are percentile intervals, the default, as on the page. Cohen et al. (2003): the total effect of gender on salary is printed as $3,917 and the path f = 1.72 (chapter 12), but the raw data of Table 3.5.1 yield $3,902 and 1.79, and the indirect effect through seniority is $2,408 and not $2,423; and in Table 7.4.1D two asterisks are attached to the nonsignificant slope t = −.40. Bauer and Curran (2005, p. 380, note 2): when the interaction is significant and there are no real roots, the slope is significant at every value of W, and not "at no value" as written there. Hayes (2022): on p. 457 the indirect effect is printed as −0.218 and in the output −.1281; on p. 281 F(1, 207) = 4.257 with p = .016 – the correct value is .040; and the appendix syntax marks hc=0 as the default (p. 581), contrary to p. 608. The full list – in the verification report.