Re: [R] Strange Estimates from lmer and glmmPQL

From: Martin Maechler <maechler_at_stat.math.ethz.ch>
Date: Thu 01 Dec 2005 - 20:44:31 EST

>>>>> "Rick" == Rick Bilonick <rab45@pitt.edu>
>>>>> on Wed, 30 Nov 2005 23:11:07 -0500 writes:

    Rick> I'm trying to fit a generalized mixed effects model to a data set where
    Rick> each subject has paired categorical responses y (so I'm trying to use a
    Rick> binomial logit link). There are about 183 observations and one
    Rick> explanatory factor x. I'm trying to fit something like:

    Rick> (lmer(y~x+(1|subject)))

If you want binomial you have to give ' family = binomial ' to lmer !

Further, always using 'data = ..' is generally recommended practice, and I'd rather assign the result of lmer(.) than just print it, i.e. (if you want to print too):

 (model1 <- lmer(y ~ x + (1|subject), data = <your DFrame>, family = binomial))

and in your case y should be the 2-column matrix

   cbind(successes, failures)

Martin Maechler, ETH Zurich

    Rick> I also tried fitting the same type of model using glmmPQL from MASS. In
    Rick> both cases, I get a t-statistic that is huge (in the thousands) and a
    Rick> tiny p-value. (Just for comparison, if I use lrm ignoring the clustering
    Rick> I get a t-statistic around 3 or so and what appears to be a reasonable
    Rick> estimated coefficient which is very close to the estimated coefficient
    Rick> using just one observation from each subject.

    Rick> Most of the subjects have two responses and in almost all cases the
    Rick> responses are identical although the explantory factor values are not     Rick> always identical for each subject.

    Rick> If I use geeglm from geepack, I get reasonable estimates close to the     Rick> naive model results.

    Rick> I also tried using the SAS glimmix macro to fit a generalized mixed     Rick> model and the routine does not converge.

    Rick> Why does geeglm appear to work but not lmer and glmmPQL? Is this likely     Rick> to be due to my particular data set?

    Rick> Rick B.

    Rick> ______________________________________________
    Rick> R-help@stat.math.ethz.ch mailing list
    Rick> https://stat.ethz.ch/mailman/listinfo/r-help     Rick> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

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 Thu Dec 01 20:49:42 2005

This archive was generated by hypermail 2.1.8 : Thu 01 Dec 2005 - 23:33:00 EST