View source: R/dose-response.R
sample_p1_p2 | R Documentation |
Creates a set of dose-response curves – one per individual – supposed to mimic participants in an experiment. This is based on Bayesian models fit to parameter estimates from Phillips et al., (2017).
sample_p1_p2(n, p1_distribution_parameters, p2_distribution_parameters)
n |
the number of individual dose-response curves to generate |
p1_distribution_parameters |
a named list of items used to characterise the p1 distribution: cdf_inv_full, weight. Here cdf_inv is the inverse-cdf characterising the distribution of p1 distribution from Phillips et al. (2017); "weight" a number (0<=weight<=1) used to control the variance reduction in individual heterogeneity. |
p2_distribution_parameters |
a named list of items used to characterise the log_p2|p1 distribution. It comprises: "alpha" posteriors draws for the intercept in the regression of log_p2 on p1; "beta" posterior draws for slope parameter in the regression of log_p2 on p1; "sigma0" posterior draws for the constant noise term in the regression of log_p2 on p1; "sigma1" posterior draws for the heteroscedastic noise term in the regression of log_p2 on p1; "weight" a number (0<=weight<=1) used to control the variance reduction in individual heterogeneity. |
a tibble of p1 and p2 values for each individual dose-response curve
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.