1
$\begingroup$

This question already has an answer here:

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?
$\endgroup$

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

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 4
    $\begingroup$ This has been answered many times. The short answer is no. But instead of asking if a certain parameter makes sense to examine, state what you would like to estimate and go and estimate that. I find this is most easily envisioned through differences in predicted values. $\endgroup$ – Frank Harrell Mar 8 '14 at 20:23
  • $\begingroup$ So you mean plug in different values for the predictors then study the differences in fitted values? $\endgroup$ – luciano Mar 8 '14 at 20:51
  • 1
    $\begingroup$ Yes, but be more intentional about it. An effect of interest may be changing hp by $x$ units holding wt to $y$. $\endgroup$ – Frank Harrell Mar 8 '14 at 21:16
3
$\begingroup$

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.

$\endgroup$
  • 1
    $\begingroup$ Also the contrast function in the rms package does quite general comparisons. $\endgroup$ – Frank Harrell Mar 8 '14 at 23:54
  • $\begingroup$ Greg - tried TkPredict. Looks like a fantastic tool that will propel my statistical learning. Question: in for example the model lm(mpg ~ hp x wt), when changing values for wt, is it possible for the plot to move the line of best fit whilst maintaining the same scale for mpg? I would prefer the line of best fit to move rather than the scale for mpg. $\endgroup$ – luciano Mar 9 '14 at 9:38
  • $\begingroup$ @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. $\endgroup$ – Greg Snow Mar 9 '14 at 18:46

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