theundergrad
2013-Jan-12 21:56 UTC
[R] Interpreting coefficients in linear models with interaction terms
Hi,
I am trying to interpret the coefficients in the model: RateOfMotorPlay ~
TestNumber + Sex + TestNumber * Sex where there are thee different tests and
Sex is (obviously) binary. My results are: Residuals:
Min 1Q Median 3Q Max
-86.90 -26.28 -7.68 22.52 123.74
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 29.430 6.248 4.710 4.80e-06 ***
TestNumber2 56.231 8.837 6.364 1.47e-09 ***
TestNumber3 75.972 10.061 7.551 1.82e-12 ***
SexM 7.101 9.845 0.721 0.472
TestNumber2:SexM -16.483 13.854 -1.190 0.236
TestNumber3:SexM -24.571 15.343 -1.601 0.111
---
Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1
Residual standard error: 40.97 on 188 degrees of freedom
Multiple R-squared: 0.3288, Adjusted R-squared: 0.3109
F-statistic: 18.42 on 5 and 188 DF, p-value: 7.231e-15
I am looking for one number that will represent the significance of the
interaction term. I was thinking of doing an F test comparing this model to
one without the interaction. When I do this, I get a highly significant
result. I am not exactly sure how to interpret this. In particular, it seems
strange to me to have a significant interaction term without both
independent variables being significant. Any advice would be highly
appreciated.
Thanks!
--
View this message in context:
http://r.789695.n4.nabble.com/Interpreting-coefficients-in-linear-models-with-interaction-terms-tp4655365.html
Sent from the R help mailing list archive at Nabble.com.
Rolf Turner
2013-Jan-12 22:33 UTC
[R] Interpreting coefficients in linear models with interaction terms
We don't do people's homework for them.
But since you seem to have put in at least a little bit of your
own effort ..... It is perfectly possible for there to be an interaction
without there being main effects.
Consider two factors A and B each with two levels. Let mu_11 be
the population mean when A is at level 1 and B is at level 1, and so
on.
Suppose mu_11 = 1, mu_12 = -1, mu_21 = -1, and mu_22 = 1.
Then there are no main effects; A averages to 0, as does B.
But there is an elephant-ful of interaction.
cheers,
Rolf Turner
cheers,
Rolf Turner
On 01/13/2013 10:56 AM, theundergrad wrote:> Hi,
>
> I am trying to interpret the coefficients in the model: RateOfMotorPlay ~
> TestNumber + Sex + TestNumber * Sex where there are thee different tests
and
> Sex is (obviously) binary. My results are: Residuals:
> Min 1Q Median 3Q Max
> -86.90 -26.28 -7.68 22.52 123.74
>
> Coefficients:
> Estimate Std. Error t value Pr(>|t|)
> (Intercept) 29.430 6.248 4.710 4.80e-06 ***
> TestNumber2 56.231 8.837 6.364 1.47e-09 ***
> TestNumber3 75.972 10.061 7.551 1.82e-12 ***
> SexM 7.101 9.845 0.721 0.472
> TestNumber2:SexM -16.483 13.854 -1.190 0.236
> TestNumber3:SexM -24.571 15.343 -1.601 0.111
> ---
> Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1
>
> Residual standard error: 40.97 on 188 degrees of freedom
> Multiple R-squared: 0.3288, Adjusted R-squared: 0.3109
> F-statistic: 18.42 on 5 and 188 DF, p-value: 7.231e-15
>
> I am looking for one number that will represent the significance of the
> interaction term. I was thinking of doing an F test comparing this model to
> one without the interaction. When I do this, I get a highly significant
> result. I am not exactly sure how to interpret this. In particular, it
seems
> strange to me to have a significant interaction term without both
> independent variables being significant. Any advice would be highly
> appreciated.
theundergrad
2013-Jan-13 03:28 UTC
[R] Interpreting coefficients in linear models with interaction terms
Hi, I have very limited (one class and the rest self-taught) statistics background (I am a comparative biology major) working on an independent study. I think that I am beginning to understand: The coefficient SexM is the slope estimate for TestNumber1. If I add the coefficients for the other two interaction terms to the coefficient of SexM, I will get the slope estimate for the other two tests. How would I quantify the significance of the interaction and SexM in the model? If, as I have done previously and as David suggests, I look at three different models each using only one test, I can quantify the effect of SexM simply by looking at the associated p-value. If, however, I chose to look at the interaction model in order to reduce the number of tests conducted , I do not have one number to look at that quantifies the significance of sex or the interaction. I thought about doing two F-tests, one comparing this model to a model without interaction (to find the significance of the interaction) and one comparing this model to one with only TestNumber (to find the total significance of sex). When I do this, I get a p-value of 0.006 for the first test and 0.3 for the second. My understanding of this is that SexM is non-significant; however, the relationship between SexM and RateOfMotorPlay significantly changes with TestNumber. This seems strange to me, but I seem to be hearing that it is possible. If this is true, I think that reporting that sex is non-significant is adequate and I do not need to report anything about the interaction since my research question is related to the effect of sex, not the change in the effect of sex over time. Does this approach adequately address the issue of whether or not sex is related to RateOfMotorPlay? Thank you all so much for you helpful responces -- View this message in context: http://r.789695.n4.nabble.com/Interpreting-coefficients-in-linear-models-with-interaction-terms-tp4655365p4655390.html Sent from the R help mailing list archive at Nabble.com.