I'm trying to understand what adding a 3rd covariate to a regression model does to the overall effects on interaction effects. I'll be using the mtcars dataset in R for this.

I'm using the variables vs (Engine: 0 = V-shaped, 1 = straight) and am (Transmission: 0 = automatic, 1 = manual) to predict mpg Miles per gallon. I want to also see what the effect of including another variable disp Displacement has on the overall interaction effects.

So I run the code here to see what the model is like without the disp covariate.


model_no_covariates=lm(mpg ~ vs * am, data=mtcars)

Here is the output of that model

            Estimate Std. Error t value Pr(>|t|)    
(Intercept)   15.050      1.002  15.017 6.34e-15 ***
vs             5.693      1.651   3.448   0.0018 ** 
am             4.700      1.736   2.708   0.0114 *  
vs:am          2.929      2.541   1.153   0.2589    

Now I run a model with the covariate

model_covariates1=lm(mpg ~ vs * am + disp, data=mtcars)

Here is the ouput of that model

             Estimate Std. Error t value Pr(>|t|)    
(Intercept) 25.830194   3.141938   8.221 7.93e-09 ***
vs           0.191405   2.076056   0.092  0.92722    
am           0.136115   1.941240   0.070  0.94462    
disp        -0.030145   0.008465  -3.561  0.00139 ** 
vs:am        4.920696   2.206541   2.230  0.03425 *  

I see things have changed, but what exactly does the covariate change in the interaction effect here? What is the interpretation of how disp affects the interaction? Explanations with plots and visualizations are very much appreciated as I'm trying to understand how to better explore these effects myself with plots, but I'm unsure where to start

Edit: instead of just providing estimates from interaction effects I included the full model output


1 Answer 1


Adding disp changed not just the interaction, but both main effects and the intercept. It makes both main effects smaller (meaning that they are smaller when the other one is 0) but it makes the interaction larger (meaning vs and am have larger effects when the other is 1).

You can also get R to output the predicted values at the mean value of disp and see this in numbers.

  • $\begingroup$ I'm slightly confused by the interpretation here: "meaning that they are smaller when the other one is 0" and same with the interaction interpretation. I get it changes things, but I'm looking for more of an intuition to what this change represents in the interaction. $\endgroup$
    – Jin
    Commented Oct 14, 2019 at 2:31
  • $\begingroup$ To get an intuition, get R to output the predicted values and look at those. $\endgroup$
    – Peter Flom
    Commented Oct 14, 2019 at 11:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.