# [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

Neglecting the log link, the model is

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

where

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

\eta_i in the random intercept for SITE

and

\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.
780.432.1589

R-help@stat.math.ethz.ch mailing list