Increase iterations for new version of lmer?

I just updated lme4 to version 1.0-4, and when I ran lmer () my mixed effects model, which used to converge, now prints this warning:

Warning message: In (function (fn, par, lower = rep.int(-Inf, n), upper = rep.int(Inf, : failure to converge in 10000 evaluations 

So, I would like to try to increase the number of iterations in order to check if I can fix this. (I must say, I have no idea what causes the warning, as the first part of the message sounds a bit opaque). In any case, I read in the documentation that I should now use lmerControl () , but I could not implement it. Can someone give me a concrete example of how you will do this for specificity? (Help file does not help). Here is my model:

 m <- lmer(RT ~ Factor1*Factor2 + (0+Factor1+Factor2|Subject) + (1|Subject) + (1|Item) + (0+Factor1+Factor2|Item), data= data) 

Thank you so much!

+7
iteration r lme4 lmer
source share
1 answer

The lmerControl function allows you to select optimizer and pass control options. Parameters that control the number of iterations or ratings vary from function to function (as described on the help page for lmerControl ). The default optimizer is Nelder_Mead, and for this optimizer choice, the maximum number of ratings can be changed by specifying maxfun in the optCtrl parameter list:

 m <- lmer(RT ~ Factor1*Factor2 + (0+Factor1+Factor2|Subject) + (1|Subject) + (1|Item) + (0+Factor1+Factor2|Item), data= data, control=lmerControl(optCtrl=list(maxfun=20000) ) ) 

This is not a guarantee that convergence will be achieved. (My experience is that the default maximum maximum is usually sufficient.) It is entirely possible that your data is insufficient to support the complexity of a model or a model improperly constructed to develop a study.

+12
source share

All Articles