fit_mmrm | R Documentation |
Fits a MMRM model allowing for different covariance structures using mmrm::mmrm()
.
Returns a list
of key model parameters beta
, sigma
and an additional element failed
indicating whether or not the fit failed to converge. If the fit did fail to converge
beta
and sigma
will not be present.
fit_mmrm(
designmat,
outcome,
subjid,
visit,
group,
cov_struct = c("us", "ad", "adh", "ar1", "ar1h", "cs", "csh", "toep", "toeph"),
REML = TRUE,
same_cov = TRUE
)
designmat |
a |
outcome |
a numeric vector. The outcome value to be regressed on in the MMRM model. |
subjid |
a character / factor vector. The subject identifier used to link separate visits that belong to the same subject. |
visit |
a character / factor vector. Indicates which visit the outcome value occurred on. |
group |
a character / factor vector. Indicates which treatment group the patient belongs to. |
cov_struct |
a character value. Specifies which covariance structure to use. Must be one of |
REML |
logical. Specifies whether restricted maximum likelihood should be used |
same_cov |
logical. Used to specify if a shared or individual covariance matrix should be
used per |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.