Description Usage Arguments Value Author(s) References See Also Examples
This function computes the posterior distribution of the binomial probability π when given the number of “successes” and the sample size, as well as one of a choice of priors. A plot of the posterior distribution is produced with the 95% credible interval of π.
1 2 |
s |
the number of sampling units with the feature |
n |
the number of sampling units examined |
p |
an optional hypothesized probability |
alpha |
1 - alpha is the desired level of credibility of a credible interval |
prior |
one of: "uniform", "near_0.5", "not_near_0.5", "near_0", "near_1", "custom", which are all beta distributions with appropriate parameter values. Note that if prior="custom" the following argument has to be supplied: |
params |
a vector with the a and b parameters of the custom beta prior |
the posterior probability
Robert van Hulst
van Hulst, R. 2018. Evaluating Scientific Evidence. ms.
1 | B1prop(13, 100, .1, prior="near_0")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.