rconvergenceglmmtmb

Convergence Criteria in glmmTMB - what are my options?


When using glmmTMB() of the R-package {glmmTMB} (see CRAN with links to manual & vignettes), I am aware that I have certain options when dealing with the convergence of models. More specifically, there is the control = argument to which I can pass glmmTMBControl() parameters, whose section in the manual is this:

enter image description here

Furthermore, one of the vignettes - i.e. Troubleshooting with glmmTMB - talks explicitly about dealing with convergence problems. My key point is now, however, that to my knowledge any time glmmTMBControl() is mentioned, it is always in one of these two ways:

Regarding the second one, I am left with the impression that I have multiple options besides the one shown there since "The optimizer argument can be any optimization (minimizing) function [...]" and the following phrasing:

enter image description here

Yet, I was not able to find out about any other options I could actually put as my optimizer=, since it really seems to be the exact example shown above that is presented, and I would be thankful if someone could provide a list.

P.S.: I am trying to play around with glmmTMBs convergence criteria, because it seems to often estimate slightly smaller variance components compared to the same model fit via PROC MIXED in SAS.


Solution

  • From ?glmmTMB:

    The ‘optimizer’ argument can be any optimization (minimizing) function, provided that:

    • the first three arguments, in order, are the starting values, objective function, and gradient function;
    • the function also takes a ‘control’ argument;
    • the function returns a list with elements (at least) ‘par’, ‘objective’, ‘convergence’ (0 if convergence is successful) and ‘message’ (‘glmmTMB’ automatically handles output from ‘optim()’, by renaming the ‘value’ component to ‘objective’)

    The options built into base R that satisfy these requirements (gradient-based minimizers) are nlminb and optim with method="BFGS", "L-BFGS-B", or "CG". You could also look into optimizers provided by optimx or nloptr, but you'd probably have to write a wrapper function to make sure they satisfied the criteria above ...