ci_proportion: Confidence Interval for a Single Proportion
Description
The Wilson (1927) score interval for a binomial proportion, the
package's default for proportion inference: unlike the textbook Wald
interval it cannot escape [0, 1], behaves sensibly at 0 and 1 counts,
and holds close to nominal coverage at small n (Brown, Cai, &
DasGupta, 2001, recommend it for general use). The Wald interval is
available for instruction and comparison.
Usage
ci_proportion(successes, n, conf_level = 0.95, method = c("wilson", "wald"))
Value
A data.frame (class dmar_tbl) with rows
lower_limit, proportion, upper_limit,
successes, and n, so the point estimate sits between
its confidence limits.
Arguments
successes
Number of successes, a single non-negative integer.
n
Number of trials, a single positive integer at least
successes.
Brown, L. D., Cai, T. T., & DasGupta, A. (2001). Interval estimation
for a binomial proportion. Statistical Science, 16(2),
101--133. tools:::Rd_expr_doi("10.1214/ss/1009213286")
Wilson, E. B. (1927). Probable inference, the law of succession, and
statistical inference. Journal of the American Statistical
Association, 22(158), 209--212.
See Also
responder_analysis, which uses this interval for
each group's responder proportion.