Description Usage Arguments Value Examples
View source: R/sim_dose_response.R
Simulates dose response data for a cell line given a pIC50, upper and lower bounds, number of doses, number of replicates per dose and additive and proportional variance
1 2 | sim_dose_response(pIC50 = 1, minconc = 0.001, maxconc = 30, ndoses = 10,
nreps = 3, sd_prop = 0.1, sd_add = 0.1)
|
pIC50 |
The pIC50 for the cell line |
minconc |
Lowest concentration the cell line is tested at |
maxconc |
Highest concentration the cell line is tested at |
ndoses |
Number of doses |
nreps |
Numer of replicates |
sd_prop |
Proportional standard deviation |
sd_add |
Additive standard deviation |
A data frame of dose response values
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | library(ggplot2)
set.seed(10000)
#no error
ex1 <- sim_dose_response(1, 0.001, 30, 10, 3, 0, 0)
ex1
qplot(conc, resp, data=ex1) + scale_x_log10()
#some proportional error
ex2 <- sim_dose_response(1, 0.001, 30, 10, 3, 0.1, 0)
ex2
qplot(conc, resp, data=ex2) + scale_x_log10()
#some additive error
ex3 <- sim_dose_response(1, 0.001, 30, 10, 3, 0, 0.1)
ex3
qplot(conc, resp, data=ex3) + scale_x_log10()
#both error types
ex4 <- sim_dose_response(1, 0.001, 30, 10, 3, 0, 0.1)
ex4
qplot(conc, resp, data=ex3) + scale_x_log10()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.