plot_ObsvsPred: Plots of Observed vs Predicted Values

View source: R/plot_ObsvsPred.R

plot_ObsvsPredR Documentation

Plots of Observed vs Predicted Values

Description

Visualization of observed vs predicted values by a fitted linear mixed model of tumor growth data.

Usage

plot_ObsvsPred(model, nrow = 4, ncol = 5)

Arguments

model

An object of class "lme" representing the linear mixed-effects model fitted by lmmModel().

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.

Value

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.

Examples

#' 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)    


SynergyLMM documentation built on April 4, 2025, 4:13 a.m.