View source: R/dose-response.R
virtual_treatment_experiment | R Documentation |
Either the same set of individuals are measured twice: before and after treatment; or one set of individuals is treated and another is not.
virtual_treatment_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, is_between = FALSE )
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) which reduces individual variability in dose-response curves |
treated_ed50_multiplier |
a value which multiplies natural ed50 to result in a treated ed50 = natural ed50 * treated_ed50_multiplier |
is_between |
a Boolean indicating whether experiment is within or between type |
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).
In this experiment setup, individuals have their dose-response relationship measured twice: once before a treatment and once after it.
a tibble containing 'measured' dose-response melatonin curves at each lux value for each individual twice: before and after treatment. 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.