[R-sig-ME] Do glmer and glmmadmb calculate log likelihood on thesame scale ?

Joshua Wiley jwiley.psych at gmail.com
Fri Jun 22 02:24:59 CEST 2012


Just a note that those are not the same models.  To match glmer() with
glmmadmb(), try:

gm2 <- glmer(y~Base*trt+Age+Visit+(1 | Visit) + (0 + Visit|subject),
  data=epil2, family=poisson())
logLik(gm2)

which for me gives:

'log Lik.' -421.1128 (df=8)

OR you could change glmmadmb() to

fm2 <- glmmadmb(y~Base*trt+Age+Visit+(Visit|subject),
  data=epil2, family="poisson", corStruct = "full")

however, on my machine, there are warnings about the matrix not being
positive definite, and the model never converges.  If it worked for
you, I would be curious what version of glmmADMB you are using.  Here
is my sessionInfo()

R Under development (unstable) (2012-05-22 r59410)
Platform: x86_64-w64-mingw32/x64 (64-bit)
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] lme4_0.999375-42  Matrix_1.0-7      lattice_0.20-6    glmmADMB_0.7.2.12
[5] R2admb_0.7.5.2    MASS_7.3-18

loaded via a namespace (and not attached):
[1] compiler_2.16.0 grid_2.16.0     nlme_3.1-104    stats4_2.16.0
[5] tools_2.16.0

Cheers,

Josh

On Thu, Jun 21, 2012 at 2:22 PM, David Duffy <David.Duffy at qimr.edu.au> wrote:
> On Thu, 21 Jun 2012, Simon Chamaillé-Jammes wrote:
>
>> I would like to know if glmer and glmmadmb calculate log likelihood /
>> deviance on the same scale.
>>
> What model family?
>
> data(epil2)
> epil2$subject <- factor(epil2$subject)
> fm2 <- glmmadmb(y~Base*trt+Age+Visit+(Visit|subject),
>                data=epil2, family="poisson")
> gm2 <- glmer(y~Base*trt+Age+Visit+(Visit|subject)
>             data=epil2, family=poisson())
> logLik(fm2)
> 'log Lik.' -655.41 (df=8)
> logLik(gm2)
> 'log Lik.' -272.4573 (df=9)
>
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models



-- 
Joshua Wiley
Ph.D. Student, Health Psychology
Programmer Analyst II, Statistical Consulting Group
University of California, Los Angeles
https://joshuawiley.com/



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