Ilona Leyer
2010-Jun-29 09:09 UTC
[R] mixed-effects model with two fixed effects: interaction
Dear all,
In a greenhouse experiment we tested performance of 4 different species
(B,H,P,R) under 3 different water levels in 10 replications. As response
variable e.g. the number of emerging sprouts were measured on three dates. A
simple Anova considering every measurement date separately shows a higly
significant effect of species and moisture (and partly the interaction of both).
The mixed-effects model with species and moisture shows a highly significant
effect of species and moisture as well. However, when I included the interaction
the t-values of the species dropped strongly and the SE increase and the results
for the species are not significant anymore. For me this does not seem
plausible. Has anybody an idea, how this can be interpreted and if I have done a
mistake in calculating the data?
Thanks in advance for any help!
Ilona
model1<-lme(sprouts~species+moisture,random=~time|ID)
model2<-lme(sprouts~species*moisture,random=~time|ID)
Fixed effects: sprouts ~ species + moisture
Value Std.Error DF t-value p-value
(Intercept) 7.971267 1.330500 240 5.991180 0.0000
speciesH -6.459344 1.536329 114 -4.204400 0.0001
speciesP -10.063604 1.536329 114 -6.550421 0.0000
speciesR -5.051894 1.536329 114 -3.288288 0.0013
moisturemoist 2.228835 1.330500 114 1.675185 0.0966
moisturewaterlogged 17.111149 1.330500 114 12.860688 0.0000
Fixed effects: sprouts ~ species * moisture
Value Std.Error DF t-value p-value
(Intercept) 4.831965 1.750970 240 2.759594 0.0062
speciesH -4.464197 2.476245 108 -1.802809 0.0742
speciesP -3.986787 2.476245 108 -1.610013 0.1103
speciesR -0.809376 2.476245 108 -0.326856 0.7444
moisturemoist 3.505506 2.476245 108 1.415654 0.1598
moisturewaterlogged 24.766934 2.476245 108 10.001811 0.0000
speciesH:moisturemoist -0.457291 3.501939 108 -0.130582 0.8963
speciesP:moisturemoist -2.458125 3.501939 108 -0.701932 0.4842
speciesR:moisturemoist -2.555356 3.501939 108 -0.729697 0.4672
speciesH:moisturewaterlogged -5.597498 3.501939 108 -1.598400 0.1129
speciesP:moisturewaterlogged -15.538272 3.501939 108 -4.437048 0.0000
speciesR:moisturewaterlogged -10.206874 3.501939 108 -2.914635 0.0043
Setlhare Lekgatlhamang
2010-Jun-29 11:52 UTC
[R] mixed-effects model with two fixed effects: interaction
When I replied to this message I just hit the reply button. I am
resending it using reply to all, in case it did not go to the list.
Dear Ilona,
Looking at the estimation results you have, I think your regression
equations are correctly specified. Just thinking aloud, I do not think
the results are surprising. Model2 includes more (relevant) regressors
than model1. In this green house experiment, one would expect
performance in some cases to be jointly determined by the specifies and
level of moisture. In that case, the explanatory power of
non-interactive terms will drop or vanish when the interactive terms are
also included - meanwhile the interactive terms would be significant. I
may be wrong but that is my initial thought.
Regards
Lexi
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of Ilona Leyer
Sent: Tuesday, June 29, 2010 11:10 AM
To: r-help at r-project.org
Subject: [R] mixed-effects model with two fixed effects: interaction
Dear all,
In a greenhouse experiment we tested performance of 4 different species
(B,H,P,R) under 3 different water levels in 10 replications. As response
variable e.g. the number of emerging sprouts were measured on three
dates. A simple Anova considering every measurement date separately
shows a higly significant effect of species and moisture (and partly the
interaction of both). The mixed-effects model with species and moisture
shows a highly significant effect of species and moisture as well.
However, when I included the interaction the t-values of the species
dropped strongly and the SE increase and the results for the species are
not significant anymore. For me this does not seem plausible. Has
anybody an idea, how this can be interpreted and if I have done a
mistake in calculating the data?
Thanks in advance for any help!
Ilona
model1<-lme(sprouts~species+moisture,random=~time|ID)
model2<-lme(sprouts~species*moisture,random=~time|ID)
Fixed effects: sprouts ~ species + moisture
Value Std.Error DF t-value p-value
(Intercept) 7.971267 1.330500 240 5.991180 0.0000
speciesH -6.459344 1.536329 114 -4.204400 0.0001
speciesP -10.063604 1.536329 114 -6.550421 0.0000
speciesR -5.051894 1.536329 114 -3.288288 0.0013
moisturemoist 2.228835 1.330500 114 1.675185 0.0966
moisturewaterlogged 17.111149 1.330500 114 12.860688 0.0000
Fixed effects: sprouts ~ species * moisture
Value Std.Error DF t-value p-value
(Intercept) 4.831965 1.750970 240 2.759594 0.0062
speciesH -4.464197 2.476245 108 -1.802809 0.0742
speciesP -3.986787 2.476245 108 -1.610013 0.1103
speciesR -0.809376 2.476245 108 -0.326856 0.7444
moisturemoist 3.505506 2.476245 108 1.415654 0.1598
moisturewaterlogged 24.766934 2.476245 108 10.001811 0.0000
speciesH:moisturemoist -0.457291 3.501939 108 -0.130582 0.8963
speciesP:moisturemoist -2.458125 3.501939 108 -0.701932 0.4842
speciesR:moisturemoist -2.555356 3.501939 108 -0.729697 0.4672
speciesH:moisturewaterlogged -5.597498 3.501939 108 -1.598400 0.1129
speciesP:moisturewaterlogged -15.538272 3.501939 108 -4.437048 0.0000
speciesR:moisturewaterlogged -10.206874 3.501939 108 -2.914635 0.0043
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
DISCLAIMER:\ Sample Disclaimer added in a VBScript.\ ...{{dropped:3}}
Thomas Stewart
2010-Jun-29 13:23 UTC
[R] mixed-effects model with two fixed effects: interaction
IIona- I think you may be misinterpreting the t-test. In model 1, consider the speciesH coefficient. A test that speciesH = 0, essentially asks: Is speciesH the same as speciesB? The test statistic for this hypothesis is the t-value reported in the table. (t-value= -4.2, p-value=0.0001) In model 2, the corresponding coefficient, t-value, and p-value do not correspond to the same hypothesis test from model 1. If your goal is to test the overall species effect, then the test you want is: model0<-lme(sprouts~moisture,random=~time|ID,method="ML") model1<-lme(sprouts~species+moisture,random=~time|ID,method="ML") model2<-lme(sprouts~species*moisture,random=~time|ID,method="ML") anova(model0,model2) #TEST OF SPECIES EFFECT IN MODEL WITH INTERACTION anova(model0,model1) #TEST OF SPECIES EFFECT IN MODEL WITHOUT INTERACTION And as an added bonus, (which should probably be done before the test of Species Effect) anova(model1,model2) #TEST OF INTERACTION. That is, do I really need the more complex model? Hope that helps. -tgs On Tue, Jun 29, 2010 at 5:09 AM, Ilona Leyer <ileyer@yahoo.de> wrote:> Dear all, > In a greenhouse experiment we tested performance of 4 different species > (B,H,P,R) under 3 different water levels in 10 replications. As response > variable e.g. the number of emerging sprouts were measured on three dates. A > simple Anova considering every measurement date separately shows a higly > significant effect of species and moisture (and partly the interaction of > both). The mixed-effects model with species and moisture shows a highly > significant effect of species and moisture as well. However, when I included > the interaction the t-values of the species dropped strongly and the SE > increase and the results for the species are not significant anymore. For me > this does not seem plausible. Has anybody an idea, how this can be > interpreted and if I have done a mistake in calculating the data? > > Thanks in advance for any help! > Ilona > > > model1<-lme(sprouts~species+moisture,random=~time|ID) > model2<-lme(sprouts~species*moisture,random=~time|ID) > > > Fixed effects: sprouts ~ species + moisture > Value Std.Error DF t-value p-value > (Intercept) 7.971267 1.330500 240 5.991180 0.0000 > speciesH -6.459344 1.536329 114 -4.204400 0.0001 > speciesP -10.063604 1.536329 114 -6.550421 0.0000 > speciesR -5.051894 1.536329 114 -3.288288 0.0013 > moisturemoist 2.228835 1.330500 114 1.675185 0.0966 > moisturewaterlogged 17.111149 1.330500 114 12.860688 0.0000 > > > Fixed effects: sprouts ~ species * moisture > Value Std.Error DF t-value p-value > (Intercept) 4.831965 1.750970 240 2.759594 0.0062 > speciesH -4.464197 2.476245 108 -1.802809 0.0742 > speciesP -3.986787 2.476245 108 -1.610013 0.1103 > speciesR -0.809376 2.476245 108 -0.326856 0.7444 > moisturemoist 3.505506 2.476245 108 1.415654 0.1598 > moisturewaterlogged 24.766934 2.476245 108 10.001811 0.0000 > speciesH:moisturemoist -0.457291 3.501939 108 -0.130582 0.8963 > speciesP:moisturemoist -2.458125 3.501939 108 -0.701932 0.4842 > speciesR:moisturemoist -2.555356 3.501939 108 -0.729697 0.4672 > speciesH:moisturewaterlogged -5.597498 3.501939 108 -1.598400 0.1129 > speciesP:moisturewaterlogged -15.538272 3.501939 108 -4.437048 0.0000 > speciesR:moisturewaterlogged -10.206874 3.501939 108 -2.914635 0.0043 > > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
Bilonick, Richard A
2010-Jun-29 13:41 UTC
[R] mixed-effects model with two fixed effects: interaction
On Tue, 2010-06-29 at 09:09 +0000, Ilona Leyer wrote:> Dear all, > In a greenhouse experiment we tested performance of 4 different species (B,H,P,R) under 3 different water levels in 10 replications. As response variable e.g. the number of emerging sprouts were measured on three dates. A simple Anova considering every measurement date separately shows a higly significant effect of species and moisture (and partly the interaction of both). The mixed-effects model with species and moisture shows a highly significant effect of species and moisture as well. However, when I included the interaction the t-values of the species dropped strongly and the SE increase and the results for the species are not significant anymore. For me this does not seem plausible. Has anybody an idea, how this can be interpreted and if I have done a mistake in calculating the data? > > Thanks in advance for any help! > Ilona > > > model1<-lme(sprouts~species+moisture,random=~time|ID) > model2<-lme(sprouts~species*moisture,random=~time|ID) > > > Fixed effects: sprouts ~ species + moisture > Value Std.Error DF t-value p-value > (Intercept) 7.971267 1.330500 240 5.991180 0.0000 > speciesH -6.459344 1.536329 114 -4.204400 0.0001 > speciesP -10.063604 1.536329 114 -6.550421 0.0000 > speciesR -5.051894 1.536329 114 -3.288288 0.0013 > moisturemoist 2.228835 1.330500 114 1.675185 0.0966 > moisturewaterlogged 17.111149 1.330500 114 12.860688 0.0000 > > > Fixed effects: sprouts ~ species * moisture > Value Std.Error DF t-value p-value > (Intercept) 4.831965 1.750970 240 2.759594 0.0062 > speciesH -4.464197 2.476245 108 -1.802809 0.0742 > speciesP -3.986787 2.476245 108 -1.610013 0.1103 > speciesR -0.809376 2.476245 108 -0.326856 0.7444 > moisturemoist 3.505506 2.476245 108 1.415654 0.1598 > moisturewaterlogged 24.766934 2.476245 108 10.001811 0.0000 > speciesH:moisturemoist -0.457291 3.501939 108 -0.130582 0.8963 > speciesP:moisturemoist -2.458125 3.501939 108 -0.701932 0.4842 > speciesR:moisturemoist -2.555356 3.501939 108 -0.729697 0.4672 > speciesH:moisturewaterlogged -5.597498 3.501939 108 -1.598400 0.1129 > speciesP:moisturewaterlogged -15.538272 3.501939 108 -4.437048 0.0000 > speciesR:moisturewaterlogged -10.206874 3.501939 108 -2.914635 0.0043 > > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >When there is an interaction effect, the main effects are difficult to interpret. Your model is not a simple additive one when there is an interaction. You can't predict the level of one factor without knowing the level of the other factor. Given there is an interaction between these factors, you could reparameterize it as a one-way analysis (i.e., just create 12 separate treatment groups). When there is an interaction, you can't get a simple interpretation with just two factors.