View source: R/plot_ObsvsPred.R
plot_ObsvsPred | R Documentation |
Visualization of observed vs predicted values by a fitted linear mixed model of tumor growth data.
plot_ObsvsPred(model, nrow = 4, ncol = 5)
model |
An object of class "lme" representing the linear mixed-effects model fitted by |
nrow |
Number of rows of the layout to organize the observed vs predicted plots. |
ncol |
Number of columns of the layout to organize the observed vs predicted plots. |
A layout (arranged in nrow
rows and ncol
columns) of the observed and predicted values of log
(relative tumor volume) vs Time for each SampleID (i.e. subject),
with the actual measurements, the regression line for each SampleID, and the marginal, treatment-specific,
regression line for each treatment group.
#' data(grwth_data)
# Fit the model
lmm <- lmmModel(
data = grwth_data,
sample_id = "subject",
time = "Time",
treatment = "Treatment",
tumor_vol = "TumorVolume",
trt_control = "Control",
drug_a = "DrugA",
drug_b = "DrugB",
combination = "Combination",
show_plot = FALSE
)
# Obtain the plots
plot_ObsvsPred(lmm, nrow = 4, ncol = 8)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.