Constructs a prior distribution for use as the argument
rpost or in
binpost. The user can choose
from a list of in-built priors.
A character string giving the name of the prior for p. See Details for a list of the priors available.
Further arguments to be passed to an in-built prior function.
This is only relevant if
Binomial priors. The names of the binomial priors set using
"jeffreys": the Jeffreys beta(1/2, 1/2) prior.
"laplace": the Bayes-Laplace beta(1, 1) prior.
"haldane": the Haldane beta(0, 0) prior.
"beta": a beta(α, β) prior. The argument
ab is a vector containing
The default is
ab = c(1, 1).
"mdi": the MDI prior
π(p) = 1.6186 p^p (1-p)^(1-p), 0 < p < 1.
Apart from the MDI prior these are all beta distributions.
A list of class
"binprior". The first component is the
name of the input prior. Apart from the MDI prior this will be "beta",
in which case the other component of the list is a vector of length two
giving the corresponding values of the beta parameters.
binpost for sampling from a binomial posterior
bp <- set_bin_prior(prior = "jeffreys")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.