[R] lmer and mixed effects logistic regression

Rick Bilonick rab45+ at pitt.edu
Wed Jun 14 15:59:34 CEST 2006

I'm using FC4 and R 2.3.1 to fit a mixed effects logistic regression.
The response is 0/1 and both the response and the age are the same for
each pair of observations for each subject (some observations are not
paired). For example:

id response age
1    0      30
1    0      30

2    1      55
2    1      55

3    0      37

4    1      52

5    0      39
5    0      39


I get the following error:

> (lmer(response~(1|id)+age,data=gdx,family=binomial))
Error in deviance(.Call("mer_coefGets", x, pars, 2, PACKAGE =
"Matrix")) :
        Leading minor of order 2 in downdated X'X is not positive

Similar problem if I use quasibinomial.

If I use glm, of course it thinks I have roughly twice the number of
subjects so the standard errors would be smaller than they should be.

I used SAS's NLMIXED and it converged without problems giving me
parameter estimates close to what glm gives, but with larger standard
errors. glmmPQL(MASS) gives very different parameter estimates.

Is it reasonable to fit a mixed effects model in this situation?

Is there some way to give starting values for lmer and/or glmmPQL?

Rick B.

More information about the R-help mailing list