glmer optimization questions
Tobias Heed <tobias.heed at ...> writes:
Hello, I am trying to understand the different options for fitting with glmer. I have been unable to find an overview over which options are appropriate in which cases. If there is a document out there that explains these things, I'd be thankful for a link.
No (want to write one?)
My specific questions are:
1, what is the difference in using maxIter in the function call vs. using maxfun in glmerControl()? Which one is better or more important to change when a model doesn't converge (i.e., what kind of iteration do they stand for)? Maxiter seems not to be documented in the help of lme4 1.1.0, does this mean it should not be used anymore?
maxIter is old/obsolete. maxfun controls the iteration counter in the BOBYQA/Nelder-Mead phase (i.e., optimization over the 'theta' (Cholesky factor of random-effects variance-covariance matrices) parameter vector)
2, I have a model that does not converge with Nelder-Mead, but does converge with bobyqa -- from googling around, it seems that some people like one or the other better, but are there specific things I should look out for when using the one or the other? Or, are there specific cases in which using one or the other would be more recommendable?
We don't know enough about this (yet) to make strong recommendations
3, what kind of result or warning message would indicate that I should use the restart_edge option?
If you get parameters on the boundary (i.e. 0 variances, +/-1 correlations) it may be worth trying. However, I'm not sure it's actually implemented for glmer!
4, I got this warning: 2: In commonArgs(par, fn, control, environment()) : maxfun < 10 * length(par)^2 is not recommended. par appears to be the vector with parameters passed to the optimizer. Is it necessary (or just "better", but not imperative) to set maxfun to the value indicated in this equation, or higher? Why is a higher value for maxfun not used automatically when appropriate - does it have any negative consequences? Can I read out par easily somewhere?
I believe this is coming from BOBYQA, but I'm not sure.
5, when a model converges only after tinkering with any of the options (e.g., optimizer, maxfun, restart_edge) or maxiter, does this say anything about the quality or reliability of the fit?
I would certainly be more careful to assess convergence in these cases. Do the answers look sensible? (We hope to add some more functionality for checking convergence ...)
6, when reporting a GLMM, should these kinds of options be reported? It doesn't seem that people do, but it would seem appropriate when they are necessary to achieve convergence etc., wouldn't it?
Absolutely. You should always report *everything* necessary
for someone to reproduce your results (in an appendix or online
supplement, if necessary).
cheers
Ben Bolker