This function can be called for controling the optimization
procedure used when fitting GALAMMs using galamm
.
Arguments
- optim_control
List containing optimization parameters. If
method = "L-BFGS-B"
it is passed on tostats::optim
'scontrol
argument and ifmethod = "Nelder-Mead"
, it is passed on tolme4::Nelder_Mead
's control argument. If not otherwise specified, andmethod = "L-BFGS-B"
, the following arguments are set to non-default values:fnscale = -1
andlmm = 20
.- method
Character string defining the algorithm to be used for maximizing the marginal log-likelihood. The default is
"L-BFGS-B"
, which uses the limited memory Broyden-Fletcher-Goldfarb-Shanno algorithm with box constrained as implemented instats::optim
. The other options is"Nelder-Mead"
, which calls the Nelder-Mead algorithm with box constraints implemented inlme4::Nelder_Mead
. The argument is case sensitive.- maxit_conditional_modes
Maximum number of iterations in penalized iteratively reweighted least squares algorithm. Ignored if
family = "gaussian"
for all observations, since then a single step gives the exact answer.- pirls_tol_abs
Absolute convergence criterion for penalized iteratively reweighted least squares algorithm. Defaults to 0.01, which means that when the reduction in marginal likelihood between two iterations is below 0.01, the iterations stop.
- reduced_hessian
Logical value. Defaults to
TRUE
, which means that the full Hessian matrix at the maximum marginal likelihood solution is computed. IfFALSE
, a reduced Hessian matrix with second order partial derivatives with respect to fixed regression coefficients and factor loadings. The latter can help is the full Hessian is not positive definite.
Value
Object of class galamm_control
, which typically will be
provided as an argument to galamm
.
References
batesFittingLinearMixedEffects2015galamm
broydenConvergenceClassDoublerank1970galamm
byrdLimitedMemoryAlgorithm1995galamm
fletcherNewApproachVariable1970galamm
goldfarbFamilyVariablemetricMethods1970galamm
nelderSimplexMethodFunction1965galamm
shannoConditioningQuasiNewtonMethods1970galamm
See also
Other optimization functions:
extract_optim_parameters.galamm()
Examples
# Define control object with quite a high degree of verbosity (trace = 6)
# and using the last 20 BFGS updates to estimate the Hessian in L-BFGS-B.
control <- galamm_control(optim_control = list(trace = 6, lmm = 20))