Gabriela Agostini <gabrielaagostini18 <at> gmail.com> writes: >
[snip] > I am working with GLMM using the binomial family > I use the following codes > > I dropped no significant terms, refitting the model and comparing the > changes with likelihood: > > G.1<-lmer(data$Ymat~stu+spi+stu*sp1+(1|ber),data=data,family="binomial") > G.1b<-lmer(data$Ymat~stu+spi+(1|ber),data=data,family="binomial") > > anova (G.1,G.2) > > But, when I want to evaluate the significance of random effect (1|ber) > I cannot use a likelihood-ratio test, probably because the link > function of both models is different. > A couple of minor comments: * you should probably use Ymat rather than data$Ymat as your response, it will make post-processing easier * in your first model do you really mean stu*sp1 rather than stu*spi? * since A*B is equivalent to A+B+A:B, your first model specification is equivalent (assuming you really meant stu*spi) to stu*spi OR stu+spi+stu:spi. This won't change your answers but will be clearer to experienced R users. I don't understand why anova() won't work in this case. At least for the example you've shown us, it should. The link functions aren't different. Please (1) follow up to r-sig-mixed-mod...@r-project.org and (2) try to provide a little more information: a reproducible example if possible (http://tinyurl.com/reproducible-000). PS the section in http://glmm.wikidot.com/faq may provide some useful background on testing random effects. ______________________________________________ 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.