B2props: Bayesian analysis of the binomial parameters for two samples.

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/B2props.R

Description

This function computes the posterior distributions of the binomial parameters π[1] and π[2] when given the numbers of “successes” and the sample sizes for the two samples. It uses uniform priors. A plot of the posterior distributions of the two π's is produced, and a plot of the posterior distribution of π[1] - π[2] with its 95% credible interval.

Usage

1
B2props(s, n, alpha = 0.05)

Arguments

s

a vector containing the 2 numbers of sampling units with the feature ("success")

n

a vector containing the 2 numbers of sampling units examined

alpha

1 - level of credibility, so that for alpha = 0.05 (the default) credible intervals will have 95% credibility

Value

None, the inferred difference between the probabilities and its 95% credible interval is calculated and several plots are produced

Author(s)

Robert van Hulst

References

van Hulst, R. 2018. Evaluating Scientific Evidence. ms.

See Also

B1prop

prop.test

Examples

1
B2props(c(13, 22), c(78, 92))

evidence documentation built on May 2, 2019, 2:14 p.m.