Wald interval with the possibility to adjust according to Agresti, Caffo (2000) for difference in proportions and independent samples. The Agresti-Caffo interval adds 1 to x1 and x2 and adds 2 to n1 and n2.
wald2ci(x1, n1, x2, n2, conf.level, adjust)
success counts in sample 1
sample size in sample 1
success counts in sample 2
sample size in sample 2
confidence coefficient
option to adjust the Wald interval to the Agresti-Caffo interval for better performance
A list with class '"htest"' containing the following components:
a confidence interval for the difference in proportions.
estimated difference in proportions
If adjust=AC
is chosen, the standard Wald interval is modified
to the Agresti-Caffo adjusted CI (American Statistician, 2000)
Agresti, A. (2002) Categorical Data Analysis. Wiley, 2nd Edition. Agresti, A., Caffo, B.(2000) Simple and effective confidence intervals for proportions and difference of proportions result from adding two successes and two failures. The American Statistician 54 (4), 280--288.