[R] lme4: apparently different results between 0.8-2 and 0.95-6

From: Steve Cumming <stevec_at_berl.ab.ca>
Date: Fri 22 Apr 2005 - 11:19:11 EST

I've been using lme4 to fit Poisson GLMMs with crossed random effects. The data are counts(y) sampled at 55 sites over 4 (n=12) or 5 (n=43) years. Most models use three fixed effects: x1 is a two level factor; x2 and x3 are continuous. We are including random intercepts for YEAR and SITE. On subject-matter considerations, we are also including a random coefficient for x3 within YEAR.

Neglecting the log link, the model is

        y_{i,j} = x'_i \beta + \eta_i + z'_i \phi_j + \epsilon_{i,j}


	i indexes SITE and j indexes YEAR,
      \beta is the vector of fixed effects

\eta_i in the random intercept for SITE
\phi_j are the random intercept and coefficient for YEAR.

I have written x'_i because the covariates are assumed (reasonably) to be constant over the 5 years. Thus, obviously, the z'_i = (1, x3_i) are constant over j as well.

Using lme4 0.8-2 and R 1.9.0 (under Windows), the call

        GLMM(y~x1 + x2 + x3,random = list(YEAR=~1+x3, SITE=~1), data=foo, family=poisson, offset=log(reps))

seemed to work correctly, so far as I can tell. The fixed effects were more-or-less consistent with those estimated by an ordinary GLM, and the random YEAR effects had signs, magnitudes and correlation appeared to be sensible and consistent with my expectations.

Earlier today, we updated to lme4 0.95-6 and R 2.1.0. When we try to use lmer to fit the same model, it complains bitterly:

        lmer(y ~ x1 + x2 + x3 + (1 + x3 | YEAR) + (1 | SITE), data=foo, family=poisson, offset=log(reps))

        Error: Unable to invert singular factor of downdated X'X

Simpler models still work (or at least return):

        lmer(y ~ x1 + x2 + x3 + (1 + x3 | YEAR), ...)

        lmer(y ~ x1 + x2 + x3 + (1 | YEAR) + (1 | SITE), ...)

As I mentioned, the design is unbalanced. But, we get same "invert singular factor" Error using the balanced subset.

Can anybody advise? Are we using lmer incorrectly? Or is the new error perhaps telling us that GLMM in 0.8-2 wasn't actually working in some sense?

Best regards

Steve Cumming
Boreal Ecosystems Research Ltd.

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 Received on Fri Apr 22 11:24:14 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:22 EST