mm_control() collects small R-side controls for lmm() and glmm().
verbose = -1 suppresses the pre-fit explain_model() message;
non-negative values emit it once before optimization (it travels on the
message stream, so suppressMessages() and knitr's message = FALSE
also quiet it).
Usage
mm_control(
verbose = 0L,
max_feval = NULL,
optimizer = NULL,
start = NULL,
ftol_rel = NULL,
ftol_abs = NULL,
xtol_rel = NULL,
optCtrl = NULL,
disp_method = NULL,
disp_dof_correction = NULL,
max_phi_iter = NULL
)Arguments
- verbose
Integer verbosity level. Use
-1to suppress the automatic model explanation and the fit notices (the GLMM estimator notice, themm_rows_droppedmissing-value notice, grouping coercion and scaling advisories).- max_feval
Optional positive integer capping the optimizer's objective evaluations. Most useful for
glmm()withmethod = "joint_laplace", whose native joint optimizer otherwise runs to an engine-chosen budget.NULL(default) leaves the engine default in place.- optimizer
Optional optimizer name, overriding the driver's automatic choice. One of
"auto"(default behavior),"bobyqa","newuoa","cobyla","pattern_search","trust_bq", or the PRIMA variants ("prima_bobyqa","prima_cobyla","prima_lincoa","prima_newuoa"). An unsupported or not-compiled choice raises a typed error rather than silently falling back.NULL/"auto"keep automatic selection.- start
Optional numeric warm-start vector for the covariance parameters (theta). Its length must match the model's theta dimension (the engine validates this).
NULL(default) cold-starts.- ftol_rel, ftol_abs
Optional positive relative/absolute convergence tolerances on the objective.
NULLkeeps the engine default.- xtol_rel
Optional positive relative convergence tolerance on the optimizer parameters.
NULLkeeps the engine default.- optCtrl
Optional named list in the style of lme4's
lmerControl(optCtrl = ), translated to the engine's controls:maxfun/maxeval->max_feval;ftol_rel/ftol_abs/xtol_rel-> the arguments of the same name;xtol_abs(scalar or one per theta) -> the absolute parameter tolerance;rhobeg(scalar or one per theta) -> the optimizer's initial step. Unknown names are refused with anmm_arg_errorrather than ignored. lme4'scheck.conv.*options have no counterpart: mixeff does not emit post-hoc convergence warnings; the fit's convergence status is the engine's typed certificate (optimizer_certificate(),verify_convergence()).- disp_method, disp_dof_correction, max_phi_iter
lme4 2.1-0's
glmerControl()dispersion controls forglmm()fits with a free dispersion parameter (Gamma, inverse Gaussian, Gaussian with a non-identity link).disp_method = "moment"(the default) profiles the dispersionphiin a damped fixed-point loop around PIRLS, with the working weights divided byphi;"old/buggy"restores lme4 < 2.1 (working weights withphi = 1, theta relative tosigma()).disp_dof_correction(defaultTRUE) divides the deviance byn - rank([X, Z])rather thannin the moment estimator, andmax_phi_iter(lme4'smaxPhiIter, default 100) caps thephiiterations per objective evaluation. Both only matter for"moment".NULLkeeps the engine default (the lme4 2.1-0 default). Invalid values raise anmm_arg_error. For families without a free dispersion (binomial, Poisson, negative binomial) and forlmm()the settings have no effect: they are kept on the control, and the fit announces that they were ignored with anmm_control_ignored_noticemessage (silenced byverbose = -1). lme4 ignores them silently.
Details
By default the fit driver selects the optimizer and its tolerances
automatically (see optimizer_certificate() to inspect what ran). The
optimizer, start, and ftol_*/xtol_rel arguments are a narrow,
opt-in escape hatch — for recourse when the default fails to converge, for
warm starts, and for explicit tolerance overrides. Any override you supply is
recorded in the optimizer certificate, so the fit stays auditable.
See also
optimizer_certificate() to inspect which optimizer ran and whether
a caller override was applied.