This is the low-level function to fit an MMRM. Note that this does not
try different optimizers or adds Jacobian information etc. in contrast to
mmrm().
List of class mmrm_tmb, see h_mmrm_tmb_fit() for details.
In addition, it contains elements call and optimizer.
Arguments
formula
(formula) model formula with exactly one special term
specifying the visits within subjects, see details.
data
(data.frame) input data containing the variables used in
formula.
weights
(vector) input vector containing the weights.
reml
(flag) whether restricted maximum likelihood (REML) estimation is used,
otherwise maximum likelihood (ML) is used.
covariance
(cov_struct) A covariance structure type definition,
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.
tmb_data
(mmrm_tmb_data) object.
formula_parts
(mmrm_tmb_formula_parts) list with formula parts
from h_mmrm_tmb_formula_parts().
control
(mmrm_control) list of control options produced by
mmrm_control().
which specifies response and covariates as usual, and exactly one special term
defines which covariance structure is used and what are the visit and
subject variables.
Always use only the first optimizer if multiple optimizers are provided.