binom.confint

0th

Percentile

Binomial confidence intervals

Uses eight different methods to obtain a confidence interval on the binomial probability.

Keywords
models, htest, univar
Usage
binom.confint(x, n, conf.level = 0.95, methods = "all", ...)
Arguments
x
Vector of number of successes in the binomial experiment.
n
Vector of number of independent trials in the binomial experiment.
conf.level
The level of confidence to be used in the confidence interval.
methods
Which method to use to construct the interval. Any combination of c("exact", "ac", "asymptotic", "wilson", "prop.test", "bayes", "logit", "cloglog", "probit") is allowed. Default is "all".
...
Additional arguments to be passed to binom.bayes.
Details

Nine methods are allowed for constructing the confidence interval(s):

  • exact
{ - Pearson-Klopper method.} asymptotic{ - the text-book definition for confidence limits on a single proportion using the Central Limit Theorem.} agresti-coull{ - Agresti-Coull method.} wilson{ - Wilson method.} prop.test{ - equivalent to prop.test(x = x, n = n, conf.level = conf.level)$conf.int.} bayes{ - see binom.bayes.} logit{ - see binom.logit.} cloglog{ - see binom.cloglog.} probit{ - see binom.probit.} profile{ - see binom.profile.}

Value

  • A data.frame containing the observed proportions and the lower and upper bounds of the confidence interval for all the methods in "methods".

code

(1-alpha/2)^n

References

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.

See Also

binom.bayes, binom.logit, binom.probit, binom.cloglog, binom.coverage, prop.test

Aliases
  • binom.agresti.coull
  • binom.asymp
  • binom.confint
  • binom.exact
  • binom.prop.test
  • binom.wilson
Examples
binom.confint(x = c(2, 4), n = 100, tol = 1e-8)
Documentation reproduced from package binom, version 1.0-0, License: GPL

Community examples

Looks like there are no examples yet.