Understanding interaction effects in regression

Understanding interaction effects in regression

A main effect can look perfectly plausible in your sample and yet miss the crucial research question. For example, if a therapy works differently in younger and older patient groups, or if study time only leads to better grades when self-efficacy is high, a standard regression is no longer sufficient. Understanding interaction effects in regression means making exactly these conditional relationships visible - and interpreting them in such a way that your result is professionally and methodologically sound.

What an interaction effect actually indicates

An interaction effect exists when the relationship between an independent variable X and a dependent variable Y depends on the level of a second variable Z. In this context, Z is often referred to as a moderator. The question is therefore not just: “Does X have an effect on Y?”, but: “For whom, under what conditions, or at what value of Z does this effect appear?”

An example from medicine: You are investigating whether an exercise program lowers systolic blood pressure. Age could change the effect. If the program works significantly better in younger people than in older people, program participation and age interact. The effect of the program is then not the same for all participants.

In a linear regression, this is usually formulated as:

`Y = b0 + b1X + b2Z + b3(X × Z) + e`

The coefficient `b3` describes the interaction effect. It indicates how much the slope of X changes when Z increases by one unit. For categorical variables, it correspondingly describes how differences between groups change depending on the level of the other variable.

This may sound technical at first, but it has a clear substantive consequence: As soon as there is a convincing interaction effect, main effects may no longer be interpreted in isolation and universally. The effect of X is then always tied to a specific value or a specific group of Z.

Understanding interaction effects in regression: A practical example

Let's take a master's thesis in education. The dependent variable is the exam grade, where higher values mean better performance. Weekly study time and academic self-efficacy are collected as predictors. The hypothesis: More study time improves the grade especially when students have high self-efficacy.

Without interaction, you would calculate a model with study time and self-efficacy as separate predictors. This model answers whether study time is on average associated with the grade and whether self-efficacy is on average associated with the grade. However, it cannot test whether study time is effective differently at different levels of self-efficacy.

To do this, you add the product of the two variables, i.e., `Study time × Self-efficacy`. If its regression coefficient is positive and statistically significant, the benefit of additional study time increases with growing self-efficacy. A negative coefficient would, on the other hand, mean that the relationship between study time and performance weakens at high self-efficacy.

A non-significant interaction term does not prove that there is no moderation in the population. Especially with small samples, interaction effects are harder to detect than main effects. The estimate can be imprecise if the value ranges are limited, measurements are unreliable, or relevant groups occur only rarely. Therefore, confidence intervals, effect size, sample planning, and professional plausibility belong in the evaluation.

Reading main effects correctly

In a model with interaction, the coefficients for X and Z have limited meaning. If X and Z are entered uncentered, `b1` describes the effect of X exactly when Z takes the value of zero. Whether this zero point makes sense substantively depends on the scale. For age, an age of zero years would be hardly interpretable for many research questions.

Therefore, mean centering is often useful for two metric predictors. The sample mean is subtracted from each observed value. After that, the main effect of study time describes the relationship with the exam grade at average self-efficacy. The main effect of self-efficacy applies analogously at average study time. Centering neither changes the model fit nor the interaction effect itself, but makes interpretation easier and can reduce collinearity between the product term and individual variables.

For a categorical variable, a transparent coding is needed instead. For a binary group variable, dummy coding is often used, for example 0 for the control group and 1 for the intervention group. Then the main effect of the continuous variable describes its slope in the reference group. The interaction term shows by how much this slope differs in the comparison group. Which group is chosen as a reference is not arbitrary for readability, even if the substantive model testing is not changed by this.

How to properly test a moderation hypothesis

An interaction term should arise from a professionally justified hypothesis, not from a long search for random significance. Before the analysis, it should be clear why the effect of X could vary between groups or levels of Z. In a clinical study, biological mechanisms, in business administration, and in the social sciences, different decision conditions or resources or contextual factors can justify such an assumption.

Next, estimate a hierarchical regression model. In the first step, you include the two main effects X and Z. In the second step, you add the product term X × Z. The comparison shows whether the interaction explains additional variance in Y. Do not report only the p-value of the interaction term, but also the change in the explained variance, the regression coefficient, its confidence interval, and a proper effect interpretation.

The general assumptions of linear regression remain: linearity, independent observations, appropriate distribution and variance of the residuals, as well as no problematic influential outliers. For binary, ordinal, or count data, a generalized regression model is often more appropriate. Interactions can also be tested in logistic regression, Poisson models, or multilevel models, but their interpretation is more demanding there because coefficients do not directly express linear changes in the target variable.

Control variables are useful if they represent theoretically justified confounding factors. However, you should not reflexively include every available characteristic in the model. Too many parameters with a limited sample lead to unstable estimates. Especially with interactions, you need sufficient observations across the entire value range of the variables involved.

A plot is not an addition, but part of the interpretation

A table coefficient alone rarely makes interactions understandable. Visualize the predicted values of Y for several meaningful levels of the moderator, for example at low, average, and high Z values. For categorical moderators, separate regression lines for the groups are sufficient. The crucial thing is whether the lines have different slopes - not just whether they are at different heights.

For the study time example, you could show three lines: low, medium, and high self-efficacy. If the line rises significantly at high self-efficacy, while it runs almost flat at low self-efficacy, your hypothesis becomes immediately comprehensible. If lines cross, this speaks for a particularly pronounced form of interaction, but requires a careful explanation within the actually observed data range.

Use simple slopes analyses additionally. Here, the effect of X is tested at specifically defined values of Z, for example one standard deviation below and above the mean. A Johnson-Neyman analysis shows even more precisely from which moderator values the effect of X becomes statistically significant. Which method is useful depends on the scale type, sample size, and research question. A significant overall test does not replace these follow-up analyses.

Common misinterpretations in theses and publications

The most common error is: “X and Z both have significant main effects, so there is an interaction.” This is wrong. Two main effects merely mean that both variables are on average associated with Y. An interaction presupposes that the product term models an additional conditional relationship.

Equally problematic is the statement that an interaction is proven because an effect is significant in group A and not significant in group B. The difference between “significant” and “not significant” is not automatically itself significant. Exactly this group difference is tested by the interaction term in the joint model.

Also avoid causal language with purely observational cross-sectional data. A found moderation initially shows a conditional statistical relationship. For statements about effects, you need a research design that convincingly limits alternative explanations. Extrapolations are also risky: A regression line may not be interpreted beyond value ranges that your sample does not cover.

Report results in a comprehensible way

A good results section combines the model, metrics, and content. First, state the dependent variable, the predictors, the coding, and a possible centering. Next, report the interaction term with coefficient, standard error, test statistic, p-value, and confidence interval. Add the model fit and the change through the product term.

Substantively, it should then be clear for which group or at which moderator values the effect appears. A formulation could be: “The positive relationship between study time and exam performance was stronger at high self-efficacy than at low self-efficacy.” The associated figure and the simple slopes results make this statement testable. Do not just write that an interaction exists, but what it means for your research question.

If your hypothesis, variable coding, or model selection is still uncertain, a methodological check before the final reporting is worthwhile. At Easy Statistik, trained statisticians individually support model specification, evaluation, visualization, and result presentation. Request a statistics consultation discreetly via the contact form - so that your interaction is not only calculated, but explained in a scientifically convincing way.


Put knowledge into practice

From explanation
to your own analysis.

Would you like to know which method suits your project? We review your plans free of charge and give you a clear recommendation.

Your question deserves a personal answer.

Describe your project. We will assess free of charge what support would be right for you.

This site is protected by hCaptcha and the hCaptcha Privacy Policy and Terms of Service apply.