confIntPairedProportion {biostatUZH} | R Documentation |
Compute confidence interval for the difference of paired binomial proportions using Newcombe's method.
confIntPairedProportion(x, conf.level = 0.95)
x |
A two-dimensional contingency table in matrix form. |
conf.level |
Confidence level for confidence interval. |
A list with the entries:
p1 |
Estimated proportion p_{1+}. |
p2 |
Estimated proportion p_{+1}. |
newcombeCI |
Confidence interval for the difference of paired proportions, computed according to Newcombe (1998). |
Kaspar Rufibach
kaspar.rufibach@gmail.com
The Newcombe interval is introduced in
Newcombe, R.G. (1998). Improved confidence intervals for the difference between binomial proportions based on paired data. Stat. Med., 17, 2635–2650.
A worked out example can be found in
Altman, D.G., Machin, D., Bryant, T.N., Gardner, M.J. (2000). Statistics with confidence. University Press Belfast.
# Calculate confidence interval for the example in Altman et al (2000), Table 6.2 altman62 <- rbind(c(14, 5), c(0, 22)) confIntPairedProportion(x = altman62) ## Not run: # exact McNemar test library(exact2x2) mcnemar.exact(altman62) mcnemar.test(altman62) ## End(Not run)