confIntPairedProportion: Compute confidence interval for the difference of paired...

Description Usage Arguments Value Author(s) References Examples

Description

Compute confidence interval for the difference of paired binomial proportions using Newcombe's method.

Usage

1
confIntPairedProportion(x, conf.level = 0.95)

Arguments

x

A two-dimensional contingency table in matrix form.

conf.level

Confidence level for confidence interval.

Value

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).

Author(s)

Kaspar Rufibach
kaspar.rufibach@gmail.com

References

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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# 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)

biostatUZH documentation built on May 2, 2019, 6:06 p.m.