[R] Testing random effect in logistic mixed model

From: Julien <julien.martin2_at_usherbrooke.ca>
Date: Tue 03 Apr 2007 - 17:50:54 GMT


Hi
When using linear mixed model, I could test for the effect of the random part of the model using a likelihood ratio test comparing two model with and without the random part.

model.lmer=lmer(y~x+(1|r))
model.lm = lm(y~x)
anova(model.lmer,model.lm)

However, this does not work with a mixed model with binomial or poisson distribution

> model.lmer = lmer(z~x+(1|r),family=binomial)
> model.glm = glm(z~x,family=binomial)
> anova(model.lmer,model.glm)
 Erreur dans FUN(X[[1]], ...) : aucun slot de nom "call" pour cet objet de la classe "glm"

	De plus : Warning message:
	arguments supplémentaires ignorés in: logLik.glm(X[[2]], ...)

My question is how cold I test for a random effect in logistic mixed model because the anova function does not work here?

Thanks

Julien Martin

-- 



12:48

______________________________________________
R-help@stat.math.ethz.ch 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.
Received on Wed Apr 04 03:54:17 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 03 Apr 2007 - 19:30:54 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.