[R] Testing random effect in logistic mixed model

Julien julien.martin2 at usherbrooke.ca
Tue Apr 3 19:50:54 CEST 2007

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.lm = lm(y~x)

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

> 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?


Julien Martin



More information about the R-help mailing list