[R-sig-ME] split plot design glmer
chico3 at sapo.pt
chico3 at sapo.pt
Sun Dec 9 20:58:15 CET 2012
Dear experts,
(This is the follow up of a previous question)
My background with mixed models is very pour. However,With the
precious help of this forum I have implement a glmer function to test
the experiment described below (randomized block design)
I have four luminaires randomly distributed. Two luminaires have light
on and two luminaires have no light. Below the luminaires I have two
treatments. Each treatment as four replicates that were randomly
distributed below the luminaires. Moreover, I have made all the
possible combinations of presence absence of light and treatments.
I want to check if there is a effect of each treatment and the
interactions between all the combinations.The response variable is a
proportion (number of specific specie/total number of species)
#define factors
Treatment1<-as.factor("Yes","No")
Treatment2<-as.factor("Yes","No")
Light<-as.factor("Yes","No")
Luminaire<-as.factor("LightYes1","LightYes2","NoLight1", "NoLight2")
Response<-cbind(number_of_specific_species, total_species)
#including individual level variability to account for overdispersion
obs <- 1:nrow(Response)
#model
library(lme4)
model<-glmer(Response ~ Treatment1*Treatment2*Light + (1|Luminaire) +
(1|obs), family=binomial)
summary(model)
Generalized linear mixed model fit by the Laplace approximation
Formula: Response ~ Treatment1 * Treatment2 * Light + (1 | Luminaire)
+ (1 | obs)
AIC BIC logLik deviance
180.2 194.9 -80.1 160.2
Random effects:
Groups Name Variance Std.Dev.
obs (Intercept) 0.059638 0.24421
Luminaire (Intercept) 0.000000 0.00000
Number of obs: 32, groups: obs, 32; Luminaire, 4
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.9283 0.1236 -7.511
5.88e-14 ***
Treatment1Yes 0.2416 0.1743 1.386 0.16582
Treatment2Yes -0.2459 0.1747 -1.408 0.15921
LightYes -0.2069 0.1745 -1.186 0.23562
Treatment1Yes:Treatment2Yes -0.7517 0.2468 -3.046 0.00232 **
Treatment1Yes:LightYes -0.3018 0.2464 -1.225 0.22071
Treatment2Yes:LightYes 0.2126 0.2466 0.862 0.38866
Treatment1Yes:Treatment2Yes:LightYes 0.7520 0.3488 2.156 0.03110 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) Treatment1Yes Treatment2Yes
LightYes Treatment1Ys:Treatment2Y Treatment1Y:U Treatment2Y:Light
Treatment1Yes -0.709
Treatment2Yes -0.708 0.502
LightYes -0.708 0.502 0.501
Treatment1Yes:Treatment2Ys 0.501 -0.706 -0.708 -0.355
Treatment1Yes:LightYs 0.502 -0.707 -0.355
-0.708 0.500
Treatment2Yes:LightYes 0.501 -0.355 -0.708
-0.707 0.501 0.501
Treatment1Y:Treatment2Y:Light -0.354 0.500 0.501
0.500 -0.707 -0.706 -0.707
-------------
The results are coherent with barplot and PCO analysis that I did
previously, were combination of treatment1 and treatment2 have a
greater effect than other combinations.
My question are
Is the model corrected?
How can I interpret the results, since I cannot do a Anova for example?
Cheers,
FranciscoR
More information about the R-sig-mixed-models
mailing list