Low-Level Fitting Function for MMRMSource:
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
fit_mmrm( formula, data, weights, reml = TRUE, covariance = NULL, tmb_data, formula_parts, control = mmrm_control() )
model formula with exactly one special term specifying the visits within subjects, see details.
input data containing the variables used in
input vector containing the weights.
whether restricted maximum likelihood (REML) estimation is used, otherwise maximum likelihood (ML) is used.
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.
list with formula parts from
list of control options produced by
List of class
h_mmrm_tmb_fit() for details.
formula typically looks like:
FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
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.