I run a simple GLMM with lme4 ...
model1 <- glmer.nb(S ~ Days*Grazing*Biome + (Days|Site), data=mydata, verbose=T, control=ctrl)
...and run into the convergence code 1 from bobyqa: "bobyqa -- maximum number of function evaluations exceeded". So I looked up stackoverflow and found this interesting thread.
I overhauled my control object which now looks like this:
ctrl = glmerControl(optimizer = "bobyqa",
#restart_edge=T,
boundary.tol = 1e-5,
calc.derivs=TRUE,
use.last.params=FALSE,
sparseX = FALSE,
tolPwrss=1e-7,
compDev=TRUE,
nAGQ0initStep=TRUE,
## optimizer args
optCtrl = list(maxfun = 1e5))
But I still get the same error. Then I followed the adivse of another link where it is said that
- you can use control=glmerControl(optCtrl=list(maxfun=1e5)) to adjust the maximum number of function evaluations. CHECK
- if @optinfo$feval will tell you how many function evaluations were actually used. TBD
So I did model1@optinfo$feval and it says ... 172
I must admit that I was expecting something else, so I tried everything from 1e3 to 1e8 but I am still stuck.
My lme4 version is 1.1-10; I am using a Win10 64bit R3.1.3 (maybe I should upgrade my R?)
Any (!) help or comments are most appreciated! cheers