← Back to blog
Statistical Analysis

How to Interpret Interaction Effects in Regression

4 min read

An interaction in regression allows the association between a predictor and an outcome to depend on another variable. It can address questions such as whether the relationship between attendance and a performance score differs across two program formats.

The interaction coefficient is a starting point. To explain the result, identify the coding, calculate the relevant slopes or contrasts, and show what the model predicts over values supported by your data.

A worked linear-regression example

The following example is fictional. Suppose a model predicts a performance score using hours of attendance, program format, and their interaction. Format is coded 0 for the reference format and 1 for the alternative:

Predicted score = 40 + 2 × hours + 5 × format − 1 × hours × format.

  • In format 0, the predicted score is 40 + 2 × hours. The attendance slope is 2 points per hour.
  • In format 1, the predicted score is 45 + 1 × hours. The attendance slope is 1 point per hour.
  • The interaction coefficient, −1, is the difference between the attendance slopes: 1 − 2.
  • The format difference at a particular attendance value is 5 − hours. At two hours it is 3 points; at six hours it is −1 point.

These are arithmetic illustrations, not findings from a study. Whether any estimated contrast is precise enough to support a conclusion requires its uncertainty interval and the study design.

Read the lower-order terms conditionally

In this model, the coefficient 2 describes the attendance slope in the reference format. The coefficient 5 describes the format difference at zero attendance. Neither is an unconditional average effect across all participants.

If zero is outside the observed range or irrelevant to the research question, center attendance at a meaningful value. Centering at four hours changes the format coefficient to the difference at four hours: 1 point in this example. For the same linear model with the lower-order terms retained, this reparameterization leaves fitted values and the interaction coefficient unchanged.

Usually retain the lower-order terms when including an interaction. Removing them imposes restrictions that need a substantive justification. Centering does not repair confounding, poor model fit, or an inadequate sample.

Estimate the comparison you actually want

For a continuous-by-categorical interaction, estimate the continuous predictor’s slope within each group and the group contrast at meaningful predictor values. For two continuous predictors, estimate the slope of one at selected values of the other.

Choose those values from the research question and observed range. The mean and one standard deviation above or below it are common defaults, but they are not automatically useful or supported in every dataset. Avoid extrapolating into combinations with few or no observations.

Calculate standard errors and confidence intervals for the full contrast using the covariance of the fitted coefficients. Adding coefficients gives the point estimate of a simple slope; adding their individual standard errors does not give its standard error.

Test differences directly

A significant slope in one group and a nonsignificant slope in another do not establish that the slopes differ. Test their difference directly. In the two-group linear example, that is the interaction coefficient.

For a categorical moderator with more than two groups, several interaction terms may be involved. An overall interaction test and planned contrasts can answer different questions. If you explore many subgroups or contrasts, distinguish exploratory work from planned tests and address multiplicity.

Plot predictions and show uncertainty

Plot model-based predictions over an informative range, label the predictor units and groups, and include uncertainty bands where appropriate. Show the distribution or range of the observations so readers can see which parts of the plot are supported.

A plot can reveal that a statistically detectable interaction is substantively small, or that a potentially meaningful pattern remains imprecise. It does not turn an observational association into a causal mechanism.

Logistic interactions require another step

In logistic regression, a product-term coefficient describes interaction on the log-odds scale. Exponentiating it gives a ratio of odds ratios under the specified model. It is not automatically the difference between groups’ probability changes.

If your question concerns absolute probabilities, estimate probability contrasts at relevant values or average them over a stated population, with uncertainty. Interaction depends on the scale being considered. See the logistic-regression guide for the distinction between odds and probabilities.

What to include in your report

Describe the model, predictor coding and centering, the interaction test, planned slopes or contrasts, confidence intervals, and the values used for predictions. Explain clustering or repeated measurements when relevant; the mixed-model guide discusses that data structure.

Record your interaction question and intended contrasts in the free analysis-planning worksheet. DASS can help plan and review these analyses, including reproducible contrasts and figures for a manuscript.

Further reading

UCLA OARC: Decomposing, Probing, and Plotting Interactions in R; UCLA OARC: Deciphering Interactions in Logistic Regression

Get new posts by email

One email whenever we publish something new. No spam, unsubscribe anytime.

Check your inbox — click the confirmation link to finish subscribing.

{{ subscribeErrorMsg }}