View source: R/prior_specification.R
make_prior | R Documentation |
Convenient way to generate a prior that can be used to generate samples for the SIR.
make_prior(rfn = NA, par1 = NULL, par2 = NULL, use = TRUE,
label = NULL)
rfn |
Function to be used to generate samples from the prior
distribution, such as |
par1 |
First parameter of the prior distribution. For |
par2 |
Second parameter of the prior distribution. For |
use |
Boolean, indicates whether this prior is to be used. Defaults to TRUE. |
label |
Text label of the distribution. If not set, will try to label
based on the function passed in |
A list
containing the function rfn
for generating a
sample from the prior distribution, a vector pars
containing the
parameters of the distribution, and a boolean use
flag.
make_prior(rnorm, 0, 1, TRUE)
make_prior(runif, 0, 1, TRUE)
make_prior(rlunif, 0.01, 0.2, "Log-uniform(0.01, 0.2)")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.