{"action":"created","issue":{"url":"https://api.github.com/repos/lme4/lme4/issues/289","labels_url":"https://api.github.com/repos/lme4/lme4/issues/289/labels{/name}","comments_url":"https://api.github.com/repos/lme4/lme4/issues/289/comments","events_url":"https://api.github.com/repos/lme4/lme4/issues/289/events","html_url":"https://github.com/lme4/lme4/issues/289","id":64993108,"number":289,"title":"minor Laplace discrepancies with toenail data","user":{"login":"bbolker","id":78918,"avatar_url":"https://avatars.githubusercontent.com/u/78918?v=3","gravatar_id":"","url":"https://api.github.com/users/bbolker","html_url":"https://github.com/bbolker","followers_url":"https://api.github.com/users/bbolker/followers","following_url":"https://api.github.com/users/bbolker/following{/other_user}","gists_url":"https://api.github.com/users/bbolker/gists{/gist_id}","starred_url":"https://api.github.com/users/bbolker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbolker/subscriptions","organizations_url":"https://api.github.com/users/bbolker/orgs","repos_url":"https://api.github.com/users/bbolker/repos","events_url":"https://api.github.com/users/bbolker/events{/privacy}","received_events_url":"https://api.github.com/users/bbolker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-28T21:43:19Z","updated_at":"2015-06-03T13:16:42Z","closed_at":null,"body":"This is discussed in somewhat more detail at http://rpubs.com/bbolker/toenail_laplace , but: there's a difference among R packages that implement Laplace approximation on the (in)famous toenail data.  The discrepancy is large enough that I think there's a real issue, although it may not be practically important.\r\n\r\n(Sorry formatting is messed up)\r\n```\r\n##       RE_sd   (Intercept)  treatment      visit                logLik elapsed\r\n## glmer           4.687377   -1.051835 -0.6968895 -0.9115262 -626.1709     1.076\r\n## glmmML      4.708440   -1.070209 -0.7005596 -0.9126392 -626.1627      0.101\r\n## glmmADMB 4.723452   -1.070187 -0.7005568 -0.9126386 -626.1630 112.825\r\n## SAS              4.708440   -1.070200 -0.7005000 -0.9126000 -626.1650     1.180\r\n```\r\n\r\nBasic code:\r\n```\r\nlibrary(\"foreign\") ## for read.dta\r\nlibrary(\"lme4\")\r\nlibrary(\"glmmML\")\r\nlibrary(\"glmmADMB\")\r\ntoenail <- read.dta(\"http://www.stata-press.com/data/r12/toenail.dta\")\r\n## summary(toenail)\r\ntoenail <- transform(toenail,\r\n                     patient=factor(patient),\r\n                     ## glmmML, glmmADMB prefer numeric 0/1 responses\r\n                     n.outcome=as.numeric(outcome)-1)\r\nt_glmer <- system.time(\r\n    m_glmer <- glmer(outcome~treatment+visit+(1|patient),toenail,\r\n            family=binomial))\r\nt_glmmML <- system.time(\r\n    m_glmmML <- glmmML(n.outcome~treatment+visit,\r\n                       cluster=toenail$patient,toenail,\r\n                       family=\"binomial\"))\r\nt_glmmADMB <- system.time(\r\n    m_glmmADMB <- glmmadmb(n.outcome~treatment+visit+(1|patient),toenail,\r\n                           family=\"binomial\"))\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/lme4/lme4/issues/comments/108403132","html_url":"https://github.com/lme4/lme4/issues/289#issuecomment-108403132","issue_url":"https://api.github.com/repos/lme4/lme4/issues/289","id":108403132,"user":{"login":"stevencarlislewalker","id":2754158,"avatar_url":"https://avatars.githubusercontent.com/u/2754158?v=3","gravatar_id":"","url":"https://api.github.com/users/stevencarlislewalker","html_url":"https://github.com/stevencarlislewalker","followers_url":"https://api.github.com/users/stevencarlislewalker/followers","following_url":"https://api.github.com/users/stevencarlislewalker/following{/other_user}","gists_url":"https://api.github.com/users/stevencarlislewalker/gists{/gist_id}","starred_url":"https://api.github.com/users/stevencarlislewalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevencarlislewalker/subscriptions","organizations_url":"https://api.github.com/users/stevencarlislewalker/orgs","repos_url":"https://api.github.com/users/stevencarlislewalker/repos","events_url":"https://api.github.com/users/stevencarlislewalker/events{/privacy}","received_events_url":"https://api.github.com/users/stevencarlislewalker/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T13:16:42Z","updated_at":"2015-06-03T13:16:42Z","body":"Perhaps it is just a minor issue with how the default nonlinear optimizer handles this particular example.  If you skip the `nAGQ = 0` initial step, then the log-likelihood starts to look more like the other packages:\r\n```{r}\r\n> logLik(glmer(outcome~treatment+visit+(1|patient),toenail,\r\n+              family=binomial, control = glmerControl(nAGQ0initStep = FALSE)))\r\n'log Lik.' -626.1632 (df=4)\r\n```\r\n"}}