[R-sig-ME] R-sig-mixed-models Digest, Vol 72, Issue 1
chico3 at sapo.pt
chico3 at sapo.pt
Sat Dec 1 18:33:38 CET 2012
I Ben,
I think that you are right. Thank you so much for your answer. I was
almost given up :).
Cheers,
Francisco
[snip]
> 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 has 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)
>
> Treatment1<-as.factor(“Yes”,”No”)
> Treatment2<- as.factor(“Yes”,”No”)
> Light<- as.factor(“Yes”,”No”)
> Response<-cbind(number_of_specific_species, total_species)
>
> I have made this model,
>
> model<-glmer(Response ~ Treatment1*Treatment2 + (1|Light), family=binomial)
>
> However this doesn´t allow to see the effect of light or the
> interaction between light and treatments. Moreover, I don´t know how
> to include overdispersion, since glmer doesn´t allow quasi families
> such as glm.
>
> I know this is a simple question, but I greatly would appreciate
> some clues on how to proceed.
I may be missing something here, but it doesn't make sense to me
to treat Light as a random effect (one criterion -- the levels "Light"
and "No light" aren't *exchangeable*, i.e. you couldn't switch
the factor labels without changing the meaning of the experiment).
I would say you are looking for something more like
glmer(Response ~ Treatment1*Treatment2*Light + (1|luminaire), family=binomial)
where the luminaires are labeled uniquely (e.g.
"Light1","Light2","Nolight1","Nolight2")
It sounds like this is a randomized block design (i.e. every level of
Treat1*Treat2 is present at each luminaire), so you could test the
interaction between Treat1*Treat2 and luminaire via
(Treat1*Treat2|luminaire) instead of (1|luminaire) (see e.g.
Schielzeth 2009), although you may find that this leads to estimates
of zero variance (overfitting the data).
More information about the R-sig-mixed-models
mailing list