lme4 error: "Number of levels of a grouping factor . . ."
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 07/27/2011 03:29 AM, Martin Maechler wrote:
Gabrielle Miller-Messner <gmessner at ucdavis.edu>
on Tue, 26 Jul 2011 22:26:38 -0700 writes:
> Hello, I have count/proportion data and I am trying to
> account for overdispersion in a logistic regression. With
> the following code from lme4 I receive the following error
> message:
>> glmm = glmer(cbind(fertilized, unfert) ~ density.class +
> (1|individual), family = binomial)
> Number of levels of a grouping factor for the random effects
> is *equal* to n, the number of > observations
> This problem was mentioned in Warton and Hui 2011, so I
> imagine it may have been fixed recently. I downloaded the
> most recent version of lme4 available through the command
> install.packages("lme4"). Is there an updated version of
> the package available in a different form?
{yes, lme4a on R-forge, but that's not the issue now, and not
something I'd recommend to get into just right now ...}
Well, I'm puzzled that you say you get an *error* with the above
message.
You should get a message, but no error in the case of glmer().
Probably this is indeed just a warning message and not an error? Gabrielle, does the function return an answer (i.e. a fitted model)?
Just to be sure: What does
packageVersion("lme4")
say for you?
Martin
> I am using R version 2.13.1 on OS 10.6.4.
> thank you! Gabrielle
> --
> Gabrielle Miller-Messner Graduate Student Center for
> Population Biology Section of Evolution and Ecology
> University of California, Davis 1 Shields Avenue Davis,
> California 95616 gmessner at ucdavis.edu
> [[alternative HTML version deleted]]
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk4wE90ACgkQc5UpGjwzenPiQACeJ33UCdFDFRUi3V3wh4VHEk+G KFMAnjA3LOzKK4pj7VnqbzmYaukQT6FV =jGz9 -----END PGP SIGNATURE-----