Confidence interval for a binomial proportion x/n. Equivalent to DescTools::BinomCI() in R.
Methods (method): "wilson" (the default, Wilson's score interval), "wald", "wilsoncc" (with continuity
correction), "agresti-coull", "jeffreys", "clopper-pearson" (the exact interval) and "midp" (the mid-p exact
interval). With sides: "left" or "right" only the lower or the upper limit is kept, at the one-sided level
confLevel (the two-sided interval at 1 - 2 (1 - confLevel)), and the other end is 0 or 1. Limits are clipped to
[0, 1].
The mid-p limits are the roots of their equations to the precision of the doubles; DescTools stops its search at
an absolute 1.22e-4, which leaves its limits up to 1e-4 off and gives 0 for lower limits below that. Unlike
DescTools, which returns NaN or numbers, x > n, a negative or non-integer count, n = 0 and a level outside (0, 1)
are errors.
Confidence interval for a binomial proportion x/n. Equivalent to
DescTools::BinomCI()in R.Methods (
method):"wilson"(the default, Wilson's score interval),"wald","wilsoncc"(with continuity correction),"agresti-coull","jeffreys","clopper-pearson"(the exact interval) and"midp"(the mid-p exact interval). Withsides: "left"or"right"only the lower or the upper limit is kept, at the one-sided levelconfLevel(the two-sided interval at1 - 2 (1 - confLevel)), and the other end is 0 or 1. Limits are clipped to [0, 1].The mid-p limits are the roots of their equations to the precision of the doubles; DescTools stops its search at an absolute 1.22e-4, which leaves its limits up to 1e-4 off and gives 0 for lower limits below that. Unlike DescTools, which returns NaN or numbers, x > n, a negative or non-integer count, n = 0 and a level outside (0, 1) are errors.