Learn R Programming

PropCIs (version 0.1-6)

addz2ci: Agresti-Coull CI for a binomial proportion

Description

Agresti-Coull CI for a binomial proportion based on adding $z^2/2$ successes and $z^2/2$ failures before computing the Wald CI. The CI is truncated, when it overshoots the boundary.

Usage

addz2ci(x, n, conf.level)

Arguments

x
number of successes
n
number of trials
conf.level
confidence coefficient

Value

  • A list with class "htest" containing the following components:
  • conf.inta confidence interval for the difference in proportions.
  • estimateestimated $\hat{p}$

References

Agresti, A., Coull, B. (1998): Approximate is better than exact for interval estimation of binomial proportions. The American Statistician

Examples

Run this code
addz2ci(x = 15, n = 112, conf.level = 0.95)

Run the code above in your browser using DataLab