| mmrm_control | R Documentation |
Fine-grained specification of the MMRM fit details is possible using this
control function.
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(...)
)
n_cores |
( |
method |
( |
vcov |
( |
start |
( |
accept_singular |
( |
drop_visit_levels |
( |
... |
additional arguments passed to |
optimizers |
( |
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 method and vcov arguments specify the degrees of freedom and coefficients
covariance matrix adjustment methods, respectively.
Allowed vcov includes: "Asymptotic", "Kenward-Roger", "Kenward-Roger-Linear", "Empirical" (CR0),
"Empirical-Jackknife" (CR3), and "Empirical-Bias-Reduced" (CR2).
Allowed method includes: "Satterthwaite", "Kenward-Roger", "Between-Within" and "Residual".
If method is "Kenward-Roger" then only "Kenward-Roger" or "Kenward-Roger-Linear" are allowed for vcov.
The vcov argument can be NULL to use the default covariance method depending on the method
used for degrees of freedom, see the following table:
method | Default vcov |
| Satterthwaite | 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 vcov instead for better matching
of the SAS results.
The argument start is used to facilitate the choice of initial values for fitting the model.
If function is provided, make sure its parameter is a valid element of mmrm_tmb_data
or mmrm_tmb_formula_parts and it returns a numeric vector.
By default or if NULL is provided, std_start will be used.
Other implemented methods include emp_start.
List of class mmrm_control with the control parameters.
mmrm_control(
optimizer_fun = stats::optim,
optimizer_args = list(method = "L-BFGS-B")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.