simulateTumorGrowth | R Documentation |
Helper function to simulate tumor growth data for a two-drug combination experiment.
simulateTumorGrowth(
npg = 5,
timepoints = c(0, 3, 5, 10),
initial_volume = 100,
grwrControl = 0.08,
grwrA = 0.07,
grwrB = 0.06,
grwrComb = 0.04,
sd = 0.1
)
npg |
Number of samples per group. |
timepoints |
Vector with the time points at which the tumor volume measurements have been performed. |
initial_volume |
Initial volume for the tumor growth. |
grwrControl |
Coefficient for Control treatment group tumor growth rate. |
grwrA |
Coefficient for Drug A treatment group tumor growth rate. |
grwrB |
Coefficient for Drug B treatment group tumor growth rate. |
grwrComb |
Coefficient for Combination (Drug A + Drug B) treatment group tumor growth rate. |
sd |
Variability for the tumor growth. |
The function simulates the tumor growth following exponential kinetics, given by
TV(t) = TV_0 \cdot e^{\beta_i \cdot t}
where TV_0
is given by initial_volume
, t
is given by timepoints
and \beta_i
are the coefficients given by grwrControl
, grwrA
, grwrB
, and grwrComb
.
The variability is simulated using the sd
argument to add random noise from a normal distribution N(1, SD)
,
with SD
= sd
.
A data frame with tumor growth data in long format.
# This code generates the 'grwth_data' example dataset:
set.seed(123)
grwth_data <- simulateTumorGrowth(npg = 8, timepoints = seq(0,30,3),
initial_volume = 200, grwrControl = 0.08,
grwrA = 0.07, grwrB = 0.065,
grwrComb = 0.04, sd = 0.2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.