# linear regression: interpretation of main effect when models includes interaction [duplicate]

Consider this model:

summary(lm(mpg ~ hp*wt, mtcars))

Call:
lm(formula = mpg ~ hp * wt, data = mtcars)

Residuals:
Min      1Q  Median      3Q     Max
-3.0632 -1.6491 -0.7362  1.4211  4.5513

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 49.80842    3.60516  13.816 5.01e-14 ***
hp          -0.12010    0.02470  -4.863 4.04e-05 ***
wt          -8.21662    1.26971  -6.471 5.20e-07 ***
hp:wt        0.02785    0.00742   3.753 0.000811 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 2.153 on 28 degrees of freedom
Multiple R-squared:  0.8848,    Adjusted R-squared:  0.8724
F-statistic: 71.66 on 3 and 28 DF,  p-value: 2.981e-13


The slope of hp is -0.12010 when wt is zero. As a value of zero for wt is unlikely, this for me raises the following questions:

• Is there any worth in trying to interpret a main effect coefficient when it is included in an interaction term?
• Should the main effect coefficient only be interpreted within the context of the interaction? Or in other words, in the model above, is hp:wt term the only term that should be interpreted?

## marked as duplicate by whuber♦Mar 8 '14 at 22:00

• Yes, but be more intentional about it. An effect of interest may be changing hp by $x$ units holding wt to $y$. – Frank Harrell Mar 8 '14 at 21:16
One tool to help with Frank's suggestion of comparing predictions is the Predict.Plot and TkPredict functions in the TeachingDemos package for R. You can feed your model to the functions and it will plot the predicted relationship with one of the predictors at a given value of the other(s). You can then change that other value to see how the initial relationship changes.
• Also the contrast function in the rms package does quite general comparisons. – Frank Harrell Mar 8 '14 at 23:54
• @Luciano, in the dialog box over on the right is a field labeled "plot.args" which by default has only "list()" in it. Inside of those parentheses add a ylim command, e.g. list(ylim=c(0,10)), and click on the "Refresh" button. Now the plot will keep those limits and you will see the line move. Change the ylim command to see other parts of the plot. – Greg Snow Mar 9 '14 at 18:46