The general non-linear optimizer nlminb is used by
glmmTMB for parameter estimation. It may sometimes be
necessary to tweak some tolerances in order to make a model
converge. For instance, the warning ‘iteration limit reached
without convergence’ may be fixed by increasing the number of
iterations using something like
glmmTMBControl(optCtrl=list(iter.max=1e3,eval.max=1e3)).
The argument profile allows glmmTMB to use some special
properties of the optimization problem in order to speed up estimation
in cases with many fixed effects. Enable this option using
glmmTMBControl(profile=TRUE).
Control parameters may depend on the model specification, because each
control component is evaluated inside TMBStruc, the output
of mkTMBStruc. To specify that profile should be
enabled for more than 5 fixed effects one can use
glmmTMBControl(profile=quote(length(parameters$beta)>=5)).
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;
it also takes a control argument;
it returns a list with elements (at least) par, objective, convergence (0 if convergence is successful) and message
(the code internally handles output from optim(), by renaming the value component to objective)