| scoreci | R Documentation |
"This function computes a confidence interval for a proportion. It is based on inverting the large-sample normal score test for the proportion." (Alan Agresti, who wrote the original R code)
Inputs for success, total, and level
are vectorized.
scoreci(success, total, level = 0.95, return_midpoint = FALSE)
success |
Success count. |
total |
Total count. |
level |
Optional. Confidence level. Defaults to 0.95. |
return_midpoint |
Optional. Return midpoint of confidence
interval? Defaults to |
Data frame:
success Success count
total Total count
estimate Proportion
conf.low Lower bound of the confidence interval.
conf.high Upper bound of the confidence interval.
midpoint Mid-point of the confidence interval
(for return_midpoint = TRUE).
level Confidence level.
https://users.stat.ufl.edu/~aa/cda/R/one-sample/R1/index.html
Agresti A, Coull BA. Approximate is better than "exact" for interval estimation of binomial proportions. Am Stat 1998;52:119-126. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.2307/2685469")}
Brown LD, Cai TT, DasGupta A. Interval estimation for a binomial proportion (with discussion). Stat Sci 2001;16:101-133. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/ss/1009213286")}
scoreci(success = 5, total = 10)
scoreci(success = c(5:10), total = 10, level = 0.9)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.