Moderation Analysis Explained: How to Run, Read and Report It
Moderation analysis asks when or for whom an effect holds: does the relationship between a predictor and an outcome change depending on a third variable, the moderator? Statistically, moderation is an interaction, and in regression it is tested with a product term. This guide explains the method, simple slopes and reporting with a fully worked example.
What is moderation?
A variable W moderates the effect of X on Y if the slope of Y on X differs across values of W. The model is:
Y = b0 + b1X + b2W + b3XW + ε
The conditional (simple) slope of X at a given W is b1 + b3W. The coefficient b3 is the interaction: how much the X slope changes per one-unit increase in W. Moderation is not the same as mediation. A moderator changes the strength or direction of an effect, whereas a mediator transmits it (Hayes, 2018).
When should you use it?
Use it when theory suggests an effect depends on context: a treatment working better for older patients, stress harming wellbeing less when social support is high, an intervention effect varying by baseline level. Moderators can be continuous or categorical.
Centring and interpretation
Mean-centring X and W before forming the product makes b1 and b2 interpretable as the effect of each variable at the average of the other, and reduces non-essential collinearity between the main terms and the product (Aiken & West, 1991). Centring does not change the test of b3. Always include the lower-order terms (X and W) when testing the product.
Assumptions
The usual regression assumptions apply (linearity, independent errors, constant variance, approximately normal residuals), plus a correctly specified interaction form. Interactions have lower statistical power than main effects, so small samples can miss real moderation. Avoid dichotomising continuous variables to create groups.
Original example (illustrative)
Question. Does perceived social support moderate the association between stress and wellbeing? H0: b3 = 0. Data for n = 20 students (invented for teaching):
| # | Stress | Support | Wellbeing | # | Stress | Support | Wellbeing |
|---|---|---|---|---|---|---|---|
| 1 | 53.0 | 30.0 | 55.4 | 11 | 50.0 | 43.0 | 66.0 |
| 2 | 58.0 | 28.0 | 52.7 | 12 | 55.0 | 23.0 | 50.9 |
| 3 | 53.0 | 38.0 | 62.7 | 13 | 43.0 | 28.0 | 65.2 |
| 4 | 37.0 | 36.0 | 62.6 | 14 | 48.0 | 42.0 | 63.3 |
| 5 | 59.0 | 14.0 | 41.7 | 15 | 45.0 | 34.0 | 65.3 |
| 6 | 54.0 | 19.0 | 51.6 | 16 | 56.0 | 34.0 | 57.1 |
| 7 | 45.0 | 29.0 | 62.4 | 17 | 50.0 | 27.0 | 61.1 |
| 8 | 56.0 | 27.0 | 53.6 | 18 | 47.0 | 20.0 | 58.9 |
| 9 | 54.0 | 31.0 | 60.1 | 19 | 42.0 | 31.0 | 60.9 |
| 10 | 53.0 | 31.0 | 61.3 | 20 | 47.0 | 31.0 | 61.0 |
Stress and support were mean-centred (means 50.25 and 29.80).
| Term | b | SE | t | p | 95% CI |
|---|---|---|---|---|---|
| Intercept | 59.530 | 0.464 | 128.19 | < .001 | [58.55, 60.51] |
| Stress (centred) | −0.531 | 0.081 | −6.58 | < .001 | [−0.70, −0.36] |
| Support (centred) | 0.378 | 0.069 | 5.46 | < .001 | [0.23, 0.53] |
| Stress × Support | 0.059 | 0.012 | 4.85 | < .001 | [0.03, 0.08] |
Overall model: R² = 0.916, F(3, 16) = 58.02, p < .001. Adding the interaction increased R² by ΔR² = 0.124 (from 0.792), F(1, 16) = 23.49, p = < .001.
| Support level | Slope | SE | t | p |
|---|---|---|---|---|
| Low (−1 SD = −7.26) | −0.959 | 0.122 | −7.83 | < .001 |
| Average | −0.531 | 0.081 | −6.58 | < .001 |
| High (+1 SD = 7.26) | −0.103 | 0.117 | −0.88 | .392 |
The simple slope at a given support level is b1 + b3W, with variance Var(b1) + 2W·Cov(b1,b3) + W²·Var(b3), which is why simple slopes need the coefficient covariance matrix, not just the standard errors.
Interpretation. The interaction is statistically significant (b3 = 0.059, 95% CI [0.033, 0.085]). The negative association between stress and wellbeing is steeper when support is low (slope = −0.96) than when support is high (slope = −0.10). In words, high support buffers the harm of stress. The ±1 SD values are conventional probing points, not special thresholds, and a Johnson-Neyman analysis can show where along W the slope becomes significant. With n = 20 this is a teaching example; moderation estimates are imprecise in small samples, and a cross-sectional association does not prove that support causes buffering.
How to run moderation analysis with StatFAS
Open the Moderation Analysis Calculator. Arrange one outcome column, one predictor column and one moderator column. Check whether the tool centres variables automatically, since this changes how you read the lower-order coefficients.
Understanding the output
- Interaction coefficient (b3): the key test and effect size, with its confidence interval.
- ΔR²: variance explained by the interaction beyond the main effects.
- Simple slopes: the effect of X at selected values of W, with tests.
- Interaction plot: regression lines at low, average and high W; see the interaction plot guide.
- Main-effect coefficients: interpret only at the centred (average) value of the other variable.
APA 7 reporting example
Social support significantly moderated the association between stress and wellbeing, b = 0.059, 95% CI [0.033, 0.085], t(16) = 4.85, p = < .001, ΔR² = .124. Simple slopes showed that stress was more strongly negatively associated with wellbeing at low support (b = −0.96, p = < .001) than at high support (b = −0.10, p = .392).
Common mistakes and troubleshooting
- Omitting main effects from the model that contains the product term.
- Median-splitting the moderator, which loses power and can create false results.
- Interpreting main effects as "overall" effects when an interaction is present.
- Probing slopes at arbitrary values without stating them, or extrapolating beyond the data range.
- Calling a significant interaction causal without a design that supports it.
- Confusing moderation with mediation. If the question is "how" an effect works, see mediation analysis.
Limitations and alternatives
Moderation tests assume a linear change in slope; curved interactions need extra terms. For several blocks of predictors see hierarchical regression, which is the natural way to report ΔR² for an interaction step. For categorical moderators and factors, a factorial ANOVA tests the same idea. The underlying model is described in multiple linear regression.
Conclusion
Moderation analysis tests whether an effect depends on context. Centre your variables, test the product term, probe simple slopes at stated values, and describe the pattern in plain language with confidence intervals and an honest note on sample size.
1.
statfas-moderation-analysis-interface.png, alt: "StatFAS Moderation Analysis Calculator interface"2.
statfas-moderation-analysis-example-data.png, alt: "Example data entered in the StatFAS Moderation Analysis Calculator"3.
statfas-moderation-analysis-settings.png, alt: "Moderation Analysis Calculator settings in StatFAS"4.
statfas-moderation-analysis-result.png, alt: "Moderation Analysis Calculator results generated in StatFAS"Frequently asked questions
What is the difference between moderation and mediation?
A moderator changes the strength or direction of the relationship between two variables (a 'when' question). A mediator explains how or why one variable affects another by transmitting the effect (a 'how' question).
Do I need to centre my variables?
Centring is not required for the interaction test, but it makes the main-effect coefficients interpretable at the mean of the other variable and reduces collinearity with the product term.
Why is my interaction not significant when I expected it to be?
Interaction tests have lower power than tests of main effects, especially with small samples or measurement error. A wide confidence interval means the data cannot distinguish a meaningful interaction from none.
References
- Aiken, L. S., & West, S. G. (1991). Multiple regression: Testing and interpreting interactions. Sage.
- Hayes, A. F. (2018). Introduction to mediation, moderation, and conditional process analysis (2nd ed.). Guilford Press.
- Cohen, J., Cohen, P., West, S. G., & Aiken, L. S. (2003). Applied multiple regression/correlation analysis for the behavioral sciences (3rd ed.). Erlbaum.