| residuals.pmrm_fit | R Documentation |
pmrm residuals.Compute the residuals (responses minus fitted values) of a fitted progression model for repeated measures.
## S3 method for class 'pmrm_fit'
residuals(object, ..., data = object$data, adjust = TRUE)
object |
A fitted model object of class |
... |
Not used. |
data |
A |
adjust |
|
A numeric vector of residuals corresponding to the
rows of the data supplied in the data argument.
Other predictions:
fitted.pmrm_fit(),
predict.pmrm_fit()
set.seed(0L)
simulation <- pmrm_simulate_decline_proportional(
visit_times = seq_len(5L) - 1,
gamma = c(1, 2)
)
fit <- pmrm_model_decline_proportional(
data = simulation,
outcome = "y",
time = "t",
patient = "patient",
visit = "visit",
arm = "arm",
covariates = ~ w_1 + w_2
)
str(residuals(fit))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.