| .wilson_ci | R Documentation |
Provides valid coverage even at p-hat = 0 or 1, unlike Wald. Reference: Wilson (1927) JASA; Agresti & Coull (1998) TAS.
.wilson_ci(p, n, z, side = c("lower", "upper"))
p |
Estimated proportion. |
n |
Effective sample size. |
z |
Critical value (e.g., qnorm(0.975) for 95% CI). |
side |
Character: "lower" or "upper". |
Scalar bound, clamped to 0–1.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.