Description Usage Arguments Value Examples
A sandbox to simulate and visualize random normal heteroscedastic response data. Variances enlarge with the value of y predicted by the model using a constant coefficeint of variation (cv). The data generating formula is derived from the one-site total binding model: y=Bmax*x/(x+kd). Failure errors in the plot fitting subfunction will occasionally happen due to the random data. These are more frequent with higher cv values. Just re-simulate with modified parameter values.
1 |
x |
a vector representing dose or concentration of ligand (exponential or linear values) |
bmax |
the measured value where the receptor population is completely saturated by ligand (i.e. maximum binding) |
kd |
the value of x that yields y/Bmax = 0.5 (the equilibrium binding constant) |
cv |
the coefficient of variation for y replicates |
reps |
an integer value for number of replicates |
log |
logical value. Default is FALSE. If TRUE, linear x values are transformed using a log10 function for plotting. Only for visual aesthetic. |
ggplot, data
1 2 3 4 5 6 7 8 9 10 | dose <- c(1, 3, 10, 30, 100, 300) # eg, in nM units
logdose <- c(1e-3, 3e-3, 1e-2, 3e-2, 1e-1, 3e-1, 1e0, 3e0) # eg, in nM units
set.seed(2345)
binddat <- sim1sbind(dose, bmax = 1000, kd = 50, cv = 0.10, reps = 5, log = FALSE ); binddat
binddat$data #extract the data frame containing x and cv-modified y values
sim1sbind(logdose, bmax = 10000, kd = 5e-2, cv = 0.20, reps = 5, log = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.