ci.bayes.prop: Bayesian credible interval for a proportion
Description
Computes a Bayesian credible interval for a population proportion using the
mean and standard deviation of a prior Beta distribution along with sample
information. The mean and standard deviation of the posterior Beta
distribution are also reported. For a noninformative prior, set the prior
mean to .5 and the prior standard deviation to 1/sqrt(12) (which
corresponds to a Beta(1,1) distribution). The prior variance must be
less than m(1 - m) where m is the prior mean.
Usage
ci.bayes.prop(alpha, prior_mean, prior_sd, f, n)
Value
Returns a 1-row matrix. The columns are:
Posterior mean - posterior mean of Beta distribution
Posterior SD - posterior standard deviation of Beta distribution