Moderation (2-level Mod × continuous IV) — interaction + simple slopes
VerifiedAdvanced & specialized
Run this test straight away on a free built-in teaching dataset — no data of your own needed — or bring your own. Either opens the guided workspace: variable setup, assumption diagnostics, results with effect sizes and confidence intervals, figures, and APA-ready reporting.
Loading teaching datasets…
Or use your own dataset
Loading your datasets…
Tests whether the linear effect of a continuous predictor (IV) on a continuous outcome (y) DIFFERS across two levels of a dichotomous moderator (Mod).
Reports the interaction coefficient β_int with SE, 95% CI and p-value as the headline test of moderation; the ΔR² of adding the interaction to the additive y ~ IV + Mod model; and per-moderator-level simple slopes (β, SE, 95% CI, p) for the IV → y relationship. Centres the IV before forming the interaction term to reduce multicollinearity and ease coefficient interpretation.
Worked example
Does the effect of X on Y depend on a continuous moderator W?
A moderation model regresses Y on X, W and their product; a significant X×W term means the X-effect changes with W, probed via simple slopes.
The X × W interaction was significant, b = 0.18, p = .009; simple slopes showed X predicted Y at high W but not low W.
Moderation analysis showed a significant X × W interaction, b = 0.18, p = .009, with X predicting Y only at higher levels of W.
When to use it
- Continuous IV × dichotomous moderator on continuous yStress reactivity (y) ~ caffeine dose (IV) × treatment group (Mod, n = 80).
- Dose-response with subgroup moderatorBP reduction (y) ~ baseline severity (IV) × drug arm (active/placebo) (n = 200 RCT).
When NOT to — use instead
- Categorical IV × categorical moderatorUse two-way ANOVA — the interaction question is the same but the model is more natural for two categorical factors. → Two-Way ANOVA (factorial A \u00d7 B)
- Continuous IV × continuous moderatorUse a continuous interaction term in standard regression with simple-slopes plots at moderator percentiles. → Linear Regression \u2014 OLS (continuous y + predictors)
- Binary outcomeUse logistic regression with interaction term. → Binomial Logistic Regression \u2014 odds ratios + ROC AUC + classification
- Mediation rather than moderationMediation tests an indirect effect through an intermediate variable — different from moderation. → Linear Regression \u2014 OLS (continuous y + predictors)
Hypotheses
Parameter tested: β_int — the interaction coefficient (slope difference)
Assumptions (and what to do if they fail)
Check: p-value of IV:Mod term.
If violated: No moderation detected — the simpler additive model y ~ IV + Mod is more defensible.
Check: Shapiro-Wilk p-value.
If violated: Non-normal residuals affect small-n CIs / p-values.
Check: Breusch-Pagan p-value on the full model.
If violated: Heteroscedasticity → SE on β_int is anti-conservative.
Check: min(n_mod=0, n_mod=1).
If violated: Small subgroup → wide CI on the simple slope at that level → moderation conclusion may be unstable.
Ready to run a Moderation (2-level Mod × continuous IV) — interaction + simple slopes on your own data?
Guided setup, automatic assumption checks, effect sizes, figures and an APA write-up.
Run this test →