[R-sig-ME] error message from lmer routine in R

Douglas Bates bates at stat.wisc.edu
Fri May 29 15:53:01 CEST 2009


On Fri, May 29, 2009 at 5:00 AM, Alban Zeber <alban4040 at yahoo.com> wrote:

>  Dear All,

>  I have a question concerning an error message I got when I used the lmer routine in R.
>  I fit a multilevel logistic regression with a binary response y and two factors DZ and DEL   that are non nested and I got the error message:
>   "Error in mer_finalize(ans) : q = 201 > n = 160".  See below.
> y is a binary variable (131 zeroes and 29 ones), DZ and DEL are factors with 80 and 121 levels, respectively, The sample size n is 160.

>    M2 <-  lmer(y ~ 1  +(1 | DZ) + (1 | DEL),family=binomial(link="logit"))
>> Error in mer_finalize(ans) : q = 201 > n = 160

>   M2 <-  glmer(y ~ 1  +(1 | DZ) + (1 | DEL),family=binomial(link="logit"))
>> Error in mer_finalize(ans) : q = 201 > n = 160

Admittedly the message is rather cryptic but it indicates that you are
trying to fit a model with more random effects (q = number of random
effects) than observations (n).  In the case of a linear mixed model
this will result in confounding.  Some have argued that the
confounding is not as important for generalized linear mixed models
because the conditional distribution of the data given the random
effects (Bernoulli, in this case) is different from the unconditional
distribution of the random effects (Gaussian).  However, it is also
true that the information content of binary responses is very low
(exactly 1 bit per observation) and it seems to me to be overly
optimistic to expect to fit a model with more random effects than you
have observations, even if the distributions are not confounded.

>   It is not clear to me what the error is all about apart from the fact that I recognize that 201 = 80+121, the sum of the levels of the two non-nested factors. Do you have any thoughts on the meaning of this error message?
>
>   Regards,
>
>
>  Alban
>
>
>
>
>        [[alternative HTML version deleted]]
>
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>




More information about the R-sig-mixed-models mailing list