[R] Testing random effect in logistic mixed model
Julien
julien.martin2 at usherbrooke.ca
Tue Apr 3 19:50:54 CEST 2007
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
More information about the R-help
mailing list