g_mmrm_diagnostic {tern.mmrm} | R Documentation |
Diagnostic Plots for MMRM
Description
This function produces diagnostic plots.
Usage
g_mmrm_diagnostic(
object,
type = c("fit-residual", "q-q-residual"),
z_threshold = NULL
)
Arguments
object |
( |
type |
(
|
z_threshold |
( |
Details
Here we use marginal fitted values and residuals. That is, we estimate fitted values, and the difference of those fitted values vs. the observed data are the residuals.
Value
A ggplot2
plot.
See Also
g_mmrm_lsmeans()
for plotting the least-squares means and contrasts.
Examples
mmrm_results <- fit_mmrm(
vars = list(
response = "FEV1",
covariates = c("RACE", "SEX"),
id = "USUBJID",
arm = "ARMCD",
visit = "AVISIT"
),
data = mmrm_test_data,
cor_struct = "unstructured",
weights_emmeans = "equal"
)
g_mmrm_diagnostic(mmrm_results)
g_mmrm_diagnostic(mmrm_results, type = "q-q-residual")