| fitted.pmrm_fit | R Documentation |
Compute the fitted values of a fitted progression model for repeated measures.
## S3 method for class 'pmrm_fit'
fitted(object, data = object$data, adjust = TRUE, ...)
object |
A fitted model object of class |
data |
A |
adjust |
|
... |
Not used. |
For pmrm, fitted() is much faster than predict()
for large datasets, but the output only includes the estimates
(no measures of uncertainty).
A numeric vector of fitted values corresponding to the
rows of the data supplied in the data argument.
Other predictions:
predict.pmrm_fit(),
residuals.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(fitted(fit))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.