| mmrm_control {mmrm} | R Documentation |
Control Parameters for Fitting an MMRM
Description
Fine-grained specification of the MMRM fit details is possible using this
control function.
Usage
mmrm_control(
n_cores = 1L,
method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within"),
vcov = NULL,
start = std_start,
accept_singular = TRUE,
drop_visit_levels = TRUE,
...,
optimizers = h_get_optimizers(...)
)
Arguments
n_cores |
( |
method |
( |
vcov |
( |
start |
( |
accept_singular |
( |
drop_visit_levels |
( |
... |
additional arguments passed to |
optimizers |
( |
Details
For example, if the data only has observations at visits VIS1, VIS3 and VIS4, by default
they are treated to be equally spaced, the distance from VIS1 to VIS3, and from VIS3 to VIS4,
are identical. However, you can manually convert this visit into a factor, with
levels = c("VIS1", "VIS2", "VIS3", "VIS4"), and also use drop_visits_levels = FALSE,
then the distance from VIS1 to VIS3 will be double, as VIS2 is a valid visit.
However, please be cautious because this can lead to convergence failure
when using an unstructured covariance matrix and there are no observations
at the missing visits.
The
methodandvcovarguments specify the degrees of freedom and coefficients covariance matrix adjustment methods, respectively.Allowed
vcovincludes: "Asymptotic", "Kenward-Roger", "Kenward-Roger-Linear", "Empirical" (CR0), "Empirical-Jackknife" (CR3), and "Empirical-Bias-Reduced" (CR2).Allowed
methodincludes: "Satterthwaite", "Kenward-Roger", "Between-Within" and "Residual".If
methodis "Kenward-Roger" then only "Kenward-Roger" or "Kenward-Roger-Linear" are allowed forvcov.
The
vcovargument can beNULLto use the default covariance method depending on themethodused for degrees of freedom, see the following table:methodDefault vcovSatterthwaite Asymptotic Kenward-Roger Kenward-Roger Residual Empirical Between-Within Asymptotic Please note that "Kenward-Roger" for "Unstructured" covariance gives different results compared to SAS; Use "Kenward-Roger-Linear" for
vcovinstead for better matching of the SAS results.The argument
startis used to facilitate the choice of initial values for fitting the model. Iffunctionis provided, make sure its parameter is a valid element ofmmrm_tmb_dataormmrm_tmb_formula_partsand it returns a numeric vector. By default or ifNULLis provided,std_startwill be used. Other implemented methods includeemp_start.
Value
List of class mmrm_control with the control parameters.
Examples
mmrm_control(
optimizer_fun = stats::optim,
optimizer_args = list(method = "L-BFGS-B")
)