| plot.pmrm_fit | R Documentation |
Plot a fitted progression model for repeated measures (PMRM) against the data.
## S3 method for class 'pmrm_fit'
plot(
x,
y = NULL,
...,
confidence = 0.95,
show_data = TRUE,
show_marginals = TRUE,
show_predictions = FALSE,
facet = TRUE,
alpha = 0.25
)
x |
A fitted model object of class |
y |
Not used. |
... |
Not used. |
confidence |
Numeric between 0 and 1, the confidence level to use in the 2-sided confidence intervals. |
show_data |
|
show_marginals |
|
show_predictions |
|
facet |
|
alpha |
Numeric between 0 and 1, opacity level of the model-based confidence bands. |
The plot shows the following elements:
Raw estimates and confidence intervals on the data, as boxes
(if show_data is TRUE).
Model-based estimates and confidence intervals as points and error
bars, respectively
(if show_marginals is TRUE).
Continuous model-based estimates and confidence bands as lines
and shaded regions, respectively
(if show_predictions is TRUE).
A ggplot object with the plot.
Other visualization:
print.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
)
plot(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.