"General" (non-Bernoulli) binomial models in GLMMadaptive.
In general, the more quadrature points you use the better the approximation of the log-likelihood at the expense of computational time. The order of the approximation is improved every two quadrature points you add. Hence, you start at 1 (equivalent to Laplace approximation), and you go 3, 5, etc. For more info check Section 5.3 of my course notes (http://www.drizopoulos.com/courses/EMC/CE08.pdf), and also this thesis: https://macsphere.mcmaster.ca/handle/11375/17272 Best, Dimitris From: Rolf Turner <r.turner at auckland.ac.nz<mailto:r.turner at auckland.ac.nz>> Date: Sunday, 04 Aug 2019, 2:16 PM To: D. Rizopoulos <d.rizopoulos at erasmusmc.nl<mailto:d.rizopoulos at erasmusmc.nl>> Cc: R-mixed models mailing list <r-sig-mixed-models at r-project.org<mailto:r-sig-mixed-models at r-project.org>> Subject: Re: "General" (non-Bernoulli) binomial models in GLMMadaptive.
On 4/08/19 10:10 PM, D. Rizopoulos wrote:
The current CRAN version of GLMMadaptive should work for binomial data.
For example, this run in my machine:
library("GLMMadaptive")
library("lme4")
system.time(fm1 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd),
data = cbpp, family = binomial, nAGQ = 21))
system.time(gm1 <- mixed_model(cbind(incidence, size - incidence) ~ period, random = ~ 1 | herd,
data = cbpp, family = binomial(), nAGQ = 21))
summary(fm1)
summary(gm1)
Thanks very much for this. And whew! That's a relief, since neither of my proposed work-arounds seems to work worth a damn. May I just ask a quick (said he, optimistically) follow-up question? Can you provide a rationale for the choice of nAGQ = 21? (If this would require a lengthy discourse, don't worry about it.) cheers, Rolf P.S. I gather, from an off-list OOO response that I received, that you are on a conference/vacation trip. My apologies for pestering you under these circumstances. I hope that you are having an enjoyable time. R. -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276