To test moderation with an interaction term in regression, you multiply your predictor (X) by your moderator (W), add that X×W product to a regression model alongside X and W, and check whether the interaction coefficient is statistically significant. If it is, the effect of X on your outcome depends on the level of W. Many students get stuck at this point. SPSS has no built-in "moderation" button, and a significant interaction coefficient is hard to interpret on its own.
Key Takeaways
- Moderation means the strength or direction of the X→Y relationship changes depending on a third variable, W.
- You test moderation by adding an X×W interaction term to a regression that already includes X and W.
- Mean-centering continuous predictors before creating the product term makes the main effects interpretable. It does not change the interaction test itself.
- A significant interaction is followed by simple slopes analysis, which shows the effect of X at low, average, and high levels of W.
- APA 7 reporting should include the interaction coefficient (b), its SE, t, p, 95% CI, and the change in R² (ΔR²).
What is moderation in regression?
Moderation asks "for whom?" or "under what conditions?" an effect occurs. Stress may predict depression strongly in people with little social support and only weakly in people with lots of it. In that case, social support moderates the stress–depression link.
This is different from mediation, which asks why or how X affects Y through an intermediate variable. If you're unsure which applies to your hypothesis, see our guide on moderation vs mediation.
What does an interaction term actually do?
A standard regression adds effects together: Y = b₀ + b₁X + b₂W. That model assumes the effect of X is the same at every level of W. The slope lines are parallel.
Adding the product term changes that assumption:
Y = b₀ + b₁X + b₂W + b₃(X×W)
The coefficient b₃ tells you how much the slope of X changes for each one-unit increase in W. If b₃ is zero, the lines stay parallel and there is no moderation. If b₃ is significant, the lines fan out or cross.
How do you test moderation step by step?
- Check your variables. X and W can be continuous or categorical. Y should be continuous for ordinary least squares regression.
- Mean-center continuous predictors. Subtract each variable's mean from every score. After centering, b₁ becomes the effect of X at the average level of W.
- Create the product term. Multiply centered X by centered W to make a new variable.
- Run a hierarchical regression. Enter X and W in Step 1. Add X×W in Step 2.
- Test the interaction. Look at b₃ and its p value, plus ΔR² for Step 2.
- Probe a significant interaction. Compute simple slopes at −1 SD, the mean, and +1 SD of W, and plot them.
In SPSS this usually means computing variables by hand or installing Andrew Hayes' PROCESS macro, where moderation is "Model 1." StatRyx automates the whole sequence. You name your predictor, moderator, and outcome, and it centers the variables, builds the interaction term, probes simple slopes, and writes the APA results paragraph.
Worked example: does social support moderate stress and depression?
Imagine a survey of 200 adults measuring perceived stress (X), social support (W), and depressive symptoms (Y). Both predictors were mean-centered.
Step 1 (X and W only): The predictors explained about 21% of the variance in depression.
Step 2 (adding X×W): R² rose to .24, so ΔR² = .03, F(1, 196) = 7.40, p = .007.
The key coefficients in Step 2 were:
- Stress: b = 0.42, p < .001
- Interaction (Stress × Support): b = −0.18, SE = 0.066, t(196) = −2.72, p = .007, 95% CI [−0.31, −0.05]
Here is what each number means:
- ΔR² = .03: The interaction explains an extra 3% of variance. That sounds small, but interaction effects in field data are typically modest.
- Stress b = 0.42: At average social support, each one-point increase in stress predicts a 0.42-point rise in depression. This reading only holds because the variables were centered.
- Interaction b = −0.18: For every one-unit increase in support, the stress slope drops by 0.18. Support buffers the effect of stress.
- The CI excludes zero: The negative interaction is unlikely to be a fluke.
Simple slopes (support SD ≈ 1.11):
- Low support (−1 SD): b = 0.62, p < .001
- High support (+1 SD): b = 0.22, p = .041
Stress predicts depression at both levels. The effect is nearly three times stronger for people with low support.
Moderation vs main effects: key differences
| Feature | Main-effects model | Moderation model |
|---|---|---|
| Equation | Y = b₀ + b₁X + b₂W | Y = b₀ + b₁X + b₂W + b₃XW |
| Effect of X | Constant across all W | Changes with W |
| Plot | Parallel lines | Non-parallel or crossing lines |
| Meaning of b₁ | Overall effect of X | Effect of X when W = 0 (the mean, if centered) |
| Follow-up needed | None | Simple slopes / Johnson–Neyman |
How do you report moderation in APA 7?
A compact APA 7 write-up for the example looks like this:
A hierarchical multiple regression tested whether social support moderated the relationship between perceived stress and depressive symptoms. Predictors were mean-centered. Adding the interaction term significantly improved the model, ΔR² = .03, F(1, 196) = 7.40, p = .007. The Stress × Support interaction was significant, b = −0.18, SE = 0.07, t(196) = −2.72, p = .007, 95% CI [−0.31, −0.05]. Simple slopes analysis showed that stress predicted depression more strongly at low support (b = 0.62, p < .001) than at high support (b = 0.22, p = .041).
Always include a figure of the simple slopes. Reviewers expect one, and it communicates the pattern faster than any table. StatRyx generates this plot and the paragraph above automatically from your data.
What are the most common mistakes?
- Interpreting main effects as "overall" effects. Once an interaction is in the model, b₁ is a conditional effect at W = 0.
- Forgetting the lower-order terms. Never include X×W without X and W also in the model.
- Over-reading a non-significant interaction. It means you lack evidence of moderation. It does not prove the effect is identical across groups.
- Underpowered designs. Detecting interactions typically requires much larger samples than detecting main effects of similar size.
Stop calculating this by hand — run it free in StatRyx → Try StatRyx
Frequently Asked Questions
Do I have to mean-center variables before testing moderation?
No. Centering does not change the interaction coefficient, its p value, or ΔR². It does make the main-effect coefficients meaningful, because they then describe effects at the average of the other variable. Most methodologists recommend it for continuous predictors.
Can the moderator be a categorical variable?
Yes. Dummy-code the categorical moderator (for example, 0 = control, 1 = treatment) and multiply it by X. The interaction coefficient then shows how much the X slope differs between groups.
What if the interaction is significant but the main effects are not?
That is perfectly acceptable and fairly common, especially in crossover interactions where X has opposite effects at different levels of W. Interpret the interaction through simple slopes rather than the individual main effects.
Is PROCESS Model 1 the same as regression with an interaction term?
Yes. PROCESS Model 1 runs the same OLS regression with an X×W product term. It adds conveniences such as automatic simple slopes, Johnson–Neyman intervals, and optional bootstrapped confidence intervals. The coefficients match a manually built interaction model.
How large a sample do I need to detect moderation?
There is no single number, because power depends on the expected interaction size and on measurement reliability. Interaction effects are usually small (ΔR² around .01–.03), so samples of several hundred are often needed. Run a power analysis for an f² of roughly .02 before collecting data.