View source: R/confIntProportion.R
confIntPairedProportion | 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 |
p2 |
Estimated proportion |
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.
confIntIndependentProportion
, wilson
,
mcnemar.exact
# 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)
# exact McNemar test
if(require("exact2x2")){
mcnemar.exact(altman62)
mcnemar.test(altman62)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.