View source: R/dose-response.R
virtual_experiment | R Documentation |
The model used to generate these experiments comprises two elements: a model representing the underlying dose-response curves (which is based on a two parameter logistic); and a model of typical experimental error in these measurements. The model was fit using estimates presented in Phillips et al., (2017).
virtual_experiment( n, lux = c(10, 30, 50, 100, 200, 400, 2000), thresh_25 = 0.5, thresh_75 = 1.5, individual_variation_level = 1, treated_ed50_multiplier = 1 )
n |
number of individual dose-response curves to generate |
lux |
a vector of lux values which defaults to c(10, 30, 50, 100, 200, 400, 2000) |
thresh_25 |
lower bound on simulated ed25 vs observed ed25 (bound calculated as thresh_25 * observed) |
thresh_75 |
upper bound on simulated ed75 vs observed ed75 (bound calculated as thresh_75 * observed) |
individual_variation_level |
a value (0<=value<=1) dictating individual variability in dose-response curves. Here a value of 1 indicates the level of variation seen in raw data; 0 indicates no individual variation |
treated_ed50_multiplier |
a value which multiplies natural ed50 to result in a treated ed50 = natural ed50 * treated_ed50_multiplier |
a tibble containing 'measured' dose-response melatonin curves at each lux value for each individual. The tibble also contains the simulated natural p1 and p2 values and treated p1 value (which may be the same as the natural one if the individual is untreated), as well as a Boolean indicating if a patient is treated. There is also a Boolean indicating if an individual's treated p1 value was manually adjusted to: this likely happens if applying a treatment that is too extreme.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.