[R] LMER

From: Daniel Malter <daniel_at_umd.edu>
Date: Thu, 14 Feb 2008 19:50:46 -0500


Hi,

I run the following models:

1a. lmer(Y~X+(1|Subject),family=binomial(link="logit")) and 1b. lmer(Y~X+(1|Subject),family=binomial(link="logit"),method="PQL")

Why does 1b produce results different from 1a? The reason why I am asking is that the help states that "PQL" is the default of GLMMs

and

2. gamm(Y~X,family=binomial(link="logit"),random=list(Subject=~1))

The interesting thing about the example below is, that gamm is also supposed to fit by "PQL". Interestingly, however, the GAMM fit yields about the coefficient estimates of 1b. But the significance values of 1a. Any insight would be greatly appreciated.

library(lme4)
library(mgcv)

Y=c(0,1,1,1,1,0,0,0,0,0,1,1,1,1,0,0,0,1,1,1,1)
X=c(1,2,3,4,3,1,0,0,2,3,3,2,4,3,2,1,1,3,4,2,3)
Subject=as.factor(c(1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7))
cbind(Y,X,Subject)

r1=lmer(Y~X+(1|Subject),family=binomial(link="logit")) summary(r1)

r2=lmer(Y~X+(1|Subject),family=binomial(link="logit"),method="PQL") summary(r2)

r3=gamm(Y~X,family=binomial(link="logit"),random=list(Subject=~1)) summary(r3$gam)



cuncta stricte discussurus

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 15 Feb 2008 - 00:55:07 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 15 Feb 2008 - 13:30:14 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive