Error in Profile likelihood based confidence intervals in glmer()
I should add this to the "troubleshooting" page, but: * There's in principle no problem at all with profiling models with multiple random effects (other than that it's likely to be slow) * The error message indicates that during profiling, the optimizer found a fitted value that was significantly better (as characterized by the 'devtol' parameter) than the supposed minimum-deviance solution returned in the first place. You can boost the 'devtol' parameter (which is currently set at a conservative 1e-9 ...) if you want to ignore this -- however, the non-monotonic profiles are also warning you that something may be wonky with the profile. It should (???) be possible to capture the new/improved parameters that were found (although I don't know if this is implemented in profile.merMod; I may have done it for bbmle but not for lme4). * the 'slice2D' methods in the bbmle package (see e.g. http://rpubs.com/bbolker/22607 ) may be useful for exploring the likelihood surface.
On 14-07-22 11:40 AM, Ravi Varadhan wrote:
Hi,
I have longitudinal binary responses from a clinical trial. I am fitting
the following random effects model in lme4::glmer. The model is
estimated without any problems. However, I get an error when I try to
compute the confidence intervals using the profile likelihood. Does not
the profiling approach work for more than one random effect? Can
someone point out the problem?
Thanks,
Ravi
summary(mod2 <- glmer(imps79b ~ tx + sweek + (sweek|id), data=schiz,
family=binomial))
Generalized linear mixed model fit by maximum likelihood (Laplace
Approximation) ['glmerMod']
Family: binomial ( logit )
Formula: imps79b ~ tx + sweek + (sweek | id)
Data: schiz
AIC BIC logLik deviance df.resid
1259.4 1291.7 -623.7 1247.4 1597
Scaled residuals:
Min 1Q Median 3Q Max
-3.03973 0.00912 0.04957 0.21372 1.45395
Random effects:
Groups Name Variance Std.Dev. Corr
id (Intercept) 13.993 3.741
sweek 4.093 2.023 -0.65
Number of obs: 1603, groups: id, 437
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 9.1994 1.3105 7.020 2.22e-12 ***
tx -2.5075 0.5996 -4.182 2.89e-05 ***
sweek -3.1344 0.4503 -6.960 3.40e-12 ***
---
Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1
Correlation of Fixed Effects:
(Intr) tx
tx -0.786
sweek -0.922 0.537
# profiled confidence intervals
confint(mod2, method="profile")
Computing profile confidence intervals ... Error in zetafun(np, ns) : profiling detected new, lower deviance In addition: Warning messages: 1: In profile.merMod(object, signames = oldNames, ...) : non-monotonic profile 2: In profile.merMod(object, signames = oldNames, ...) : non-monotonic profile
Ravi Varadhan, Ph.D. (Environmental Eng.), Ph.D. (Biostatistics) Associate Professor, Division of Geriatric Medicine & Gerontology School of Medicine, Johns Hopkins University Ph: 410-502-2619 Email: ravi.varadhan at jhu.edu <mailto:ravi.varadhan at jhu.edu> http://www.jhsph.edu/research/centers-and-institutes/johns-hopkins-center-on-aging-and-health/people/Faculty_personal_Pages/Varadhan.html