Skip to main content
v2026.11,772 entries · CC-BY 4.0

Moderation Analysis: Building and Interpreting an Interaction Term

A step-by-step walkthrough of moderated regression: centering predictors, building and interpreting the interaction coefficient, and probing it with simple slopes and a simple-slopes plot.

Written and maintained by CASRAI Editorial Board

Last updated

An interaction term tests whether the effect of one predictor on an outcome depends on the level of a second variable. Fitting it correctly is a five-step sequence — center the predictors, build the product term, fit the model, test the coefficient, then probe it with simple slopes — and each step has a specific way to get it wrong. This page walks through that sequence and how to read the result, including the plot. For the separate, prior question of whether your third variable is a moderator at all rather than a mediator, see mediator vs. moderator, which covers that distinction along with a condensed version of some of the mechanics below; this page is the full walkthrough for the moderation side, in the same way mediation analysis: methods and reporting is the full walkthrough for the mediation side.

Step 1: Center the predictors — and know what centering actually fixes

Before building the product term, subtract the sample mean from each continuous variable that will appear in it: X_c = X - mean(X) and W_c = W - mean(W). Centering is done to the raw predictors first, and the product term is built from the centered versions (X_c * W_c), never by centering an already-multiplied raw product term after the fact — that does not recover the same interpretation.

Centering exists for one real reason: interpretability of the lower-order coefficients, not to fix multicollinearity in the interaction estimate. In an uncentered model, b1 is the effect of X only when W = 0, which is frequently outside the observed range of W (a Likert scale, an age variable, an income variable rarely has a meaningful zero) and therefore not a value anyone wants to interpret. After centering, b1 becomes the effect of X at the mean of W — almost always the quantity the write-up actually needs.

What centering does not do: change whether the interaction is real. Echambadi and Hess (2007, Marketing Science 26(3), 438–445) proved analytically that the determinant of the predictors’ cross-product matrix is identical for centered and uncentered data, so the interaction coefficient, its standard error, its t value, and the model R-squared are unchanged by centering. The worked example below reproduces that result directly. If a reviewer’s actual concern is a large VIF on the product term, mean-centering the two lower-order predictors is still standard practice and does reduce the reported VIF for the product term, but the substantive collinearity between the interaction and its own components is structural, not a data-entry artifact — see multicollinearity and VIF in regression for what a genuinely inflated VIF on a non-interaction term does indicate and how to address it.

Step 2: Fit the model

The model being tested is:

Y = b0 + b1(X_c) + b2(W_c) + b3(X_c*W_c) + e

b3 is the moderation effect and the only coefficient in this equation that tests it. Software syntax:

  • R: lm(y ~ x_c * w_c, data = df) — the * operator expands automatically to both main effects plus the product term; read x_c:w_c in the output for b3.
  • SPSS: SPSS’s Linear Regression dialog does not generate a product term for you. Compute xw_c via Transform > Compute Variable as x_c * w_c first, then enter x_c and w_c in regression Block 1 and xw_c alone in Block 2 — the two-block structure is what produces the R-squared change for the interaction as a separate line in the output. See multiple regression in SPSS for the entry-method mechanics this reuses.
  • Stata: regress y c.x_c##c.w_c fits both main effects and the interaction in one line and labels the interaction term automatically; equivalently, generate xw_c = x_c*w_c followed by regress y x_c w_c xw_c.

Keep both lower-order terms in the model regardless of their own significance once the interaction is being tested — dropping a non-significant main effect to “simplify” the model breaks the hierarchical structure the interaction’s interpretation depends on.

Step 3: Read the coefficients and the R-squared change

Report b3 with its standard error, t value (or z, in software that reports one), and confidence interval. Separately report the R-squared change from adding the product term to a main-effects-only model — this tells a reader how much variance the interaction itself accounts for, which a significant b3 alone does not communicate when the effect size is small. A statistically significant interaction with a near-zero R-squared change is real but may not be practically meaningful; state both numbers rather than either alone.

After centering, b1 is the simple effect of X specifically at the mean of W, not the average effect of X across the sample and not a main effect in the ANOVA sense. Reading it as “the overall effect of X” is the single most common misreading of moderated regression output.

Step 4: Probe a significant interaction with simple slopes

A significant b3 establishes that the X–Y slope differs across levels of W. It does not, by itself, say where the slope is positive, negative, or indistinguishable from zero — that requires computing the simple slope of Y on X at specific values of W.

The pick-a-point approach (Aiken & West, Multiple Regression: Testing and Interpreting Interactions, Sage, 1991) evaluates the simple slope at three representative levels of a continuous moderator: one SD below its mean, at its mean, and one SD above its mean.

simple slope of X on Y at W = w  is  b1 + b3 · w

Its standard error follows from the variance-covariance matrix of the fitted model:

SE(simple slope) = sqrt[ Var(b1) + w²·Var(b3) + 2w·Cov(b1,b3) ]

Most software computes this directly rather than requiring the hand calculation — PROCESS model 1 in SPSS/R, the interactions or emmeans packages in R, and Stata’s margins command all report simple slopes with correct standard errors at chosen values of the moderator.

When W is genuinely continuous and there is no natural reason to prefer three particular points, the Johnson-Neyman technique is the more complete answer: instead of testing three arbitrary snapshots, it solves directly for the exact value or values of W at which the simple slope crosses from statistically significant to non-significant, defining a full region of significance across the observed range of W rather than three points inside it. It is available via the same interactions/emmeans R packages and PROCESS.

Whatever a moderator’s own scale, do not median-split a continuous W to force a two-group comparison so a simple ANOVA can be run instead — dichotomizing a continuous variable this way discards real variance, inflates the Type I error rate, and is well-documented statistical practice to avoid, not a simplification.

A worked example

The numbers in this section come from a simulated dataset (n = 240), generated for illustration with a fixed random seed and fit by ordinary least squares — not from a real study. The generating model was Y = 2.0 + 0.30·X + 0.15·W + 0.45·(X·W) + noise, so a genuine interaction is present by construction.

Coefficient Uncentered Centered
Intercept (b0) 2.100 (SE 0.075) 2.094 (SE 0.075)
X (b1) 0.226 (SE 0.078), t = 2.88 0.200 (SE 0.078), t = 2.56
W (b2) 0.089 (SE 0.079), t = 1.13 0.082 (SE 0.079), t = 1.04
X×W (b3) 0.558 (SE 0.090), t = 6.19 0.558 (SE 0.090), t = 6.19
0.1590 0.1590

b3 and the model R-squared are identical to three decimal places whether or not the predictors were centered, exactly as the Echambadi & Hess result predicts. b1 moves from 0.226 (the effect of X when W = 0, a value near the low end of this sample) to 0.200 (the effect of X at the mean of W) — a real shift in what the coefficient means, not a change in the underlying model.

Simple slopes of Y on X, computed at one SD below the mean of W, at the mean, and one SD above (W’s sample SD here is 0.953):

Level of W Simple slope of X SE t
−1 SD (W = −1.00) −0.333 0.112 −2.98
Mean (W = −0.05) +0.200 0.078 +2.56
+1 SD (W = +0.91) +0.731 0.120 +6.09

All three slopes clear conventional significance here, but the sign itself flips between low and high W: X has a significant negative effect on Y when W is low and a significant positive effect when W is high. That is a genuine crossover interaction, and it is invisible from b3 alone — reporting only “the interaction was significant, b3 = 0.56” tells a reader nothing about the fact that the relationship reverses direction, which is the actual finding.

Reading a simple-slopes plot

The plot puts the focal predictor X on the horizontal axis and the model’s predicted Y on the vertical axis, with one line per chosen level of the moderator (conventionally the same −1 SD / mean / +1 SD levels used for the simple-slopes table). Each line is the regression of Y on X holding W fixed at that level — its slope is the simple slope reported in the table above.

Predictor X (SD units)
Predicted Y
−1
0
+1

W = +1 SD
W = Mean
W = −1 SD

How to read the shape, not just the individual slopes:

  • Parallel lines mean no interaction (b3 ≈ 0) — the effect of X is the same regardless of W, and a single main-effect coefficient already describes it.
  • Fanning lines that stay the same sign but change steepness describe an “enhancing” or “buffering” pattern — X matters more (or less) at high W, but the direction of the effect never reverses.
  • Crossing lines, as in the plot above, mean the effect of X reverses sign somewhere in the range of W — a disordinal or “crossover” interaction. This is exactly where a three-point simple-slopes table can understate the finding: reporting “significant at high W, non-significant at low W” would describe a fan, and misses that the low-W slope here is itself significant, in the opposite direction. A Johnson-Neyman region of significance, computed across the full range of W rather than at three chosen points, is the more complete way to describe where the crossover actually happens.

Categorical moderators

When W is categorical rather than continuous — a two-group study condition, a binary demographic variable — center the continuous predictor X as above, but do not mean-center a 0/1 dummy-coded W the same way; leave it dummy- or effect-coded and form the product term from the centered X and the coded W directly. The simple-slopes logic still applies, just evaluated at the moderator’s actual coded values (0 and 1, or −1 and +1 for effect coding) rather than at −1 SD/mean/+1 SD, since those specific values are the entire population of a categorical moderator rather than three points chosen along a continuum.

What to report

  • b3 with its SE, t (or z), and confidence interval, from the full model with both lower-order terms retained
  • the R-squared change attributable to adding the product term
  • simple slopes with their standard errors and significance at defined, justified levels of the moderator — or a Johnson-Neyman region of significance when the moderator is continuous and no natural cut points exist
  • a plot of the interaction — the shape carries information the coefficient table alone does not
  • whether predictors were centered and, if so, what value each lower-order coefficient is now evaluated at

See regression analysis: assumptions, interpretation, and how to report it for the surrounding reporting conventions this builds on, two-way ANOVA in SPSS for the equivalent interaction test when both predictors are categorical rather than continuous, and power analysis and sample size calculation before collecting data — a design powered only for the main effect of X is routinely underpowered for its interaction with W, since the product term is fitted to the variance left over after both main effects are already accounted for. For the wider set of quantitative-methods content this page sits inside, see the research methods hub.

Frequently asked questions

Do I have to center my predictors before testing an interaction?

Not to make the interaction test valid — b3, its standard error, and the model R-squared are identical whether or not you center. Center for interpretability: it makes b1 and b2 readable as effects at the mean of the other variable, instead of effects at a value of zero that may not exist in the data.

Does mean-centering fix multicollinearity between my predictors and the interaction term?

It changes the reported VIF for the product term without changing the interaction estimate itself. Echambadi and Hess (2007) showed the underlying collinearity between an interaction and its own components is a structural property of the model, not something centering removes.

How many points should I use for a simple-slopes analysis?

Three (−1 SD, mean, +1 SD) is the conventional default for a continuous moderator, following Aiken and West (1991), but it is a default, not a requirement. When the moderator has natural, meaningful values (a clinical cutoff, a policy threshold, the two levels of a manipulated condition), use those instead. When there is no principled reason to prefer any specific points, a Johnson-Neyman region of significance avoids the choice altogether.

What does it mean if the simple slopes cross rather than fan out?

The effect of X on Y reverses sign somewhere within the range of the moderator — positive for part of the sample, negative for another part. This is a stronger and more specific finding than “the effect is stronger for some people,” and it is worth stating explicitly rather than only reporting that the interaction coefficient was significant.

Can I test an interaction with more than two continuous predictors?

Yes — three-way interactions (X·W·Z) follow the same logic, with all constituent lower-order terms and two-way products retained in the model, but they require substantially larger samples to detect reliably and the simple-slopes probing extends to conditional effects at combinations of two moderators rather than one, which is usually where a dedicated tool like PROCESS becomes worth using over a hand-built model.

Sources

  • Aiken, L. S., and West, S. G. (1991). Multiple Regression: Testing and Interpreting Interactions. Sage Publications. The source of the pick-a-point (−1 SD/mean/+1 SD) convention for simple-slopes analysis used throughout this page.
  • Echambadi, R., and Hess, J. D. (2007). “Mean-Centering Does Not Alleviate Collinearity Problems in Moderated Multiple Regression Models.” Marketing Science 26(3), 438–445.
  • Dawson, J. F. (2014). “Moderation in Management Research: What, Why, When, and How.” Journal of Business and Psychology 29, 1–19.
  • The worked-example figures above were computed by ordinary least squares (closed-form normal equations) on a simulated n = 240 dataset with a fixed random seed, run for this page; the generating coefficients and computation method are stated in the worked-example section itself.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · included with Regulatory Radar

Ask about Moderation Analysis: Building and Interpreting an Interaction Term

Ask CASRAI answers research-administration questions and cites the passages behind every claim — and says so when the corpus does not cover something, instead of guessing. It comes with a Regulatory Radar subscription at $29 a month, alongside the daily digest of regulatory changes and the dashboard of what changed.

150 questions a day, on this site, over the API, or inside your own tools through the CASRAI MCP server.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →

Regulatory Radar

Stop finding out after the fact

$29/month, cancel anytime. Daily digest updates from our analysis, a dashboard holding the same items, and a cited assistant for everything they raise.

  • Federal Register, Federal Register+, Grants.gov, Regulations.gov, NSF News, UKRI, plus CASRAI’s own published content.
  • 72,264 indexed passages, and every answer cites the ones it drew on.