Learn R Programming

SynergyLMM (version 1.1.2)

plot_ObsvsPred: 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)

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.

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.

Examples

Run this code
#' 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)    

Run the code above in your browser using DataLab