Learn R Programming

diffdepprop (version 0.1-9)

wilson.phi: Calculates a Wilson confidence interval with continuity correction

Description

wilson.phi gives a two-sided Wilson confidence interval with continuity correction for the difference of two dependent proportions. Data are assumed to be of a fourfold table, which contains the numbers of concordance and the numbers of discordance of two dependent methods. The continuity correction is performed to the estimated phi which is calculated by the entries of the fourfold table.

Usage

wilson.phi(a, b, c, d, n, alpha)

Arguments

a
first number of concordant paires as described above
b
first number of discordant paires as described above
c
second number of discordant paires as described above
d
second number of concordant paires as described above
n
number of observed objects
alpha
type I error; between zero and one

Value

A list with class '"htest"' containing the following components:
conf.int
a confidence interval for the difference in proportions
estimate
estimated difference in proportions

References

Newcombe, R.G. (1998). Improved confidence intervals for the difference between binomial proportions based on paired data. Statistics in Medicine 17. 2635-2650.

Examples

Run this code
# a=10, b=15, c=5, d=20, n=50, type I error is 0.05
conf.int=wilson.phi(10,15,5,20,50,0.05)

Run the code above in your browser using DataLab