set_bin_prior: Construction of a prior distribution for a binomial...

Description Usage Arguments Details Value See Also Examples

View source: R/priors.R

Description

Constructs a prior distribution for use as the argument bin_prior in rpost or in binpost. The user can choose from a list of in-built priors.

Usage

1
set_bin_prior(prior = c("jeffreys", "laplace", "haldane", "beta", "mdi"), ...)

Arguments

prior

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 model = "beta", when ab can be passed. See Details.

Details

Binomial priors. The names of the binomial priors set using bin_prior are:

Apart from the MDI prior these are all beta distributions.

Value

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.

See Also

binpost for sampling from a binomial posterior distribution.

Examples

1
bp <- set_bin_prior(prior = "jeffreys")

revdbayes documentation built on Feb. 13, 2018, 1:04 a.m.