Uses eight different methods to obtain a confidence interval on the binomial probability.
Vector of number of successes in the binomial experiment.
Vector of number of independent trials in the binomial experiment.
The level of confidence to be used in the confidence interval.
Which method to use to construct the interval. Any
Additional arguments to be passed to
Nine methods are allowed for constructing the confidence interval(s):
exact - Pearson-Klopper method. See also
asymptotic - the text-book definition for confidence
limits on a single proportion using the Central Limit Theorem.
agresti-coull - Agresti-Coull method. For a 95% confidence
interval, this method does not use the concept of "adding 2
successes and 2 failures," but rather uses the formulas explicitly
described in the following link:
wilson - Wilson method.
prop.test - equivalent to
prop.test(x = x, n = n,
conf.level = conf.level)$conf.int.
bayes - see
logit - see
cloglog - see
probit - see
profile - see
By default all eight are estimated for each value of
n. For the "logit", "cloglog", "probit", and "profile"
methods, the cases where
x == 0 or
x == n are treated
separately. Specifically, the lower bound is replaced by
(alpha/2)^n and the upper bound is replaced by
data.frame containing the observed proportions and
the lower and upper bounds of the confidence interval for all the
Sundar Dorai-Raj ([email protected])
A. Agresti and B.A. Coull (1998), Approximate is better than "exact" for interval estimation of binomial proportions, American Statistician, 52:119-126.
R.G. Newcombe, Logit confidence intervals and the inverse sinh transformation (2001), American Statistician, 55:200-202.
L.D. Brown, T.T. Cai and A. DasGupta (2001), Interval estimation for a binomial proportion (with discussion), Statistical Science, 16:101-133.
Gelman, A., Carlin, J. B., Stern, H. S., and Rubin, D. B. (1997) Bayesian Data Analysis, London, U.K.: Chapman and Hall.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.