View source: R/plot_lmmSynergy.R
| plot_lmmSynergy | R Documentation | 
Visualization of synergy results obtained by lmmSynergy().  This functions returns a ggplot2 plot, allowing for
further personalization.
plot_lmmSynergy(syn_data)
syn_data | 
 Object obtained by   | 
plot_lmmSynergy produces a ggplot2 plot with the results of the synergy calculation. Each dot represents the estimated combination index
or synergy score, and the gray lines represent the 95% confidence intervals, for each day. Each dot is colored based on the - \log_{10} (p-value), with
purple colors indicating a -\log_{10} (p-value) < 1.3; (p-value > 0.05), and green colors indicating a -\log_{10} (p-value) > 1.3; (p-value < 0.05).
A list with ggplot2 plots (see ggplot2::ggplot() for more details) with the combination index (CI) and synergy score (SS)
estimates, confidence intervals and p-values for the synergy calculation using linear mixed models.
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"
  )
# Obtain synergy results
lmmSyn <- lmmSynergy(lmm)
# Plot synergy results
plot_lmmSynergy(lmmSyn)
# Accessing to the combination index plot
plot_lmmSynergy(lmmSyn)$CI
# Accessing to only synergy score plot
plot_lmmSynergy(lmmSyn)$SS
# Accessing to the grid of both plots side by side
plot_lmmSynergy(lmmSyn)$CI_SS
# Adding ggplot2 elements
plot_lmmSynergy(lmmSyn)$CI + 
ggplot2::labs(title = "Synergy Calculation for Bliss") + 
ggplot2::theme(legend.position = "top")  
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.