3

I have a set of GLMMs fitted with a binary response variable and a set of continuous variables, and I would like to get confidence intervals for each model. I've been using confint() function, at 95% and with the profile method, and it works without any problems if it is applied to a model with no interactions.

However, when I apply confint() to a model with interactions (continuous*continuous), I've been getting this error:

m1CI <- confint(m1, level=0.95, method="profile")

Error in zeta(shiftpar, start = opt[seqpar1][-w]) : profiling detected new, lower deviance

The model runs without any problem (although I applied an optimizer because some of the models were having problems with convergence), and here is the final form of one of them:

m1 <- glmer(Use~RSr2*W+RSr3*W+RShw*W+RScon*W+
 RSmix*W+(1|Pack/Year),
 control=glmerControl(optimizer="bobyqa", 
    optCtrl=list(maxfun=100000)), 
   data = data0516RS, family=binomial(link="logit"))

Does anyone know why this is happening, and how can I solve it?

I am using R version 3.4.3 and lme4 1.1-17

Ben Bolker
  • 211,554
  • 25
  • 370
  • 453
mto23
  • 303
  • 1
  • 5
  • 15
  • 1
    The info [here](https://stat.ethz.ch/pipermail/r-sig-mixed-models/2014q3/022394.html) from the mixed model mailing list seems relevant. – aosmith Nov 02 '18 at 15:04
  • @aosmith thanks for the link! Do you know how can I change the 'devtol' parameter that is mentioned there? – mto23 Nov 02 '18 at 15:09
  • I followed the `...` argument in the `confint.merMod` documentation to `profile.merMod` and found `devtol` as an argument there. – aosmith Nov 02 '18 at 15:14
  • thanks! I will check if it works! – mto23 Nov 02 '18 at 15:21
  • @Teresa was this successful? I'm experiencing the same problem. – Roasty247 Mar 26 '19 at 00:04
  • @Roasty247 yes it did! I changed it first to 1e-8 but it didn't work, but with 1e-7 it works! – mto23 Mar 27 '19 at 16:45

1 Answers1

2

The problem was solved by following these instructions:

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.

From https://stat.ethz.ch/pipermail/r-sig-mixed-models/2014q3/022394.html

I used the confint.merModfrom the lme4 package, and boosted the 'devtol' parameter, first to 1e-8, which didn't work for my models, and then to 1e-7. With this value, it worked

Ben Bolker
  • 211,554
  • 25
  • 370
  • 453
mto23
  • 303
  • 1
  • 5
  • 15