This function helps to fit an MMRM using TMB with a single optimizer,
while capturing messages and warnings.
fit_single_optimizer(
formula,
data,
weights,
reml = TRUE,
covariance = NULL,
tmb_data,
formula_parts,
...,
control = mmrm_control(...)
)(formula)
the model formula, see details.
(data)
the data to be used for the model.
(vector)
an optional vector of weights to be used in
the fitting process. Should be NULL or a numeric vector.
(flag)
whether restricted maximum likelihood (REML)
estimation is used, otherwise maximum likelihood (ML) is used.
(cov_struct)
a covariance structure type definition
as produced with cov_struct(), or value that can be coerced to a
covariance structure using as.cov_struct(). If no value is provided,
a structure is derived from the provided formula.
(mmrm_tmb_data)
object.
(mmrm_tmb_formula_parts)
object.
Additional arguments to pass to mmrm_control().
(mmrm_control)
object.
The mmrm_fit object, with additional attributes containing warnings,
messages, optimizer used and convergence status in addition to the
mmrm_tmb contents.
fit_single_optimizer will fit the mmrm model using the control provided.
If there are multiple optimizers provided in control, only the first optimizer
will be used.
If tmb_data and formula_parts are both provided, formula, data, weights,
reml, and covariance are ignored.