simulate_rel_change | R Documentation |
Simulates relative (fractional) changes in metabolite concentrations using a mixture of beta distributions.
simulate_rel_change(n, par1, par2 = NULL, p = 0.5, con = NULL)
n |
Number of samples to draw. |
par1 |
Parameters (alpha, beta) for first distribution. |
par2 |
Optional parameters (alpha, beta) for second distribution. |
p |
Proportion of samples to draw using |
con |
Optional vector of lower and upper constraints on generated samples. |
A vector of relative concentration values.
out <- simulate_rel_change(10000, c(2, 5), c(0.5, 0.5), 0.7, c(0.1, 1))
hist(out, 20, probability = TRUE,
main = '', xlab = 'Fractional change in concentration')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.