| predict.pmrm_fit | R Documentation |
Return the expected values, standard errors, and confidence intervals of new outcomes.
## S3 method for class 'pmrm_fit'
predict(object, data = object$data, adjust = TRUE, confidence = 0.95, ...)
object |
A fitted model object of class |
data |
A |
adjust |
|
confidence |
Numeric between 0 and 1, the confidence level to use in the 2-sided confidence intervals. |
... |
Not used. |
A tibble with one row for each row in the data argument and
columns "estimate", "standard_error", "lower", and "upper".
Columns "lower" and "upper" are lower and upper bounds of 2-sided
confidence intervals on the means.
(The confidence intervals are not actually truly prediction intervals
because they do not include variability from residuals.)
Other predictions:
fitted.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
)
new_data <- pmrm_simulate_decline_proportional(
patients = 1,
visit_times = seq_len(5L) - 1,
gamma = c(1, 2)
)
new_data$y <- NULL # Permitted but not strictly necessary.
predict(fit, new_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.