[R] Confidence interval for the difference between proportions - method used in prop.test()

From: Stefanie Von Felten <SVonfelten_at_uhbs.ch>
Date: Tue, 05 Apr 2011 12:38:34 +0200


Hello,

Does anyone know which method from Newcombe (1998)* is implemented in prop.test for comparing two proportions? I would guess it is the method based on the Wilson score (for single proportion), with and without continuity correction for prop.test(..., correct=FALSE) and prop.test(..., correct=TRUE). These methods would correspond to no. 10 and 11 tested in Newcombe, respectively. Can someone confirm this? If not, which other methods are implemented by prop.test?

There is also the function ci.pd() from the R-package Epi, which should implement method no. 10 from Newcombe. However, prop.test(..., correct=FALSE) and ci.pd do not give the same result if I do the following:

successes <- c(21, 41)
total <- c(345, 345)
prop.test(successes, total, correct=FALSE) library(Epi)
ci.pd(matrix(c(successes, total-successes),ncol=2, byrow=TRUE))

Can someone explain why?

Best wishes
Stefanie von Felten

Stefanie von Felten, PhD
Statistician
Clinical Trial Unit, CTU
University Hospital Basel
Schanzenstrasse 55
CH-4031 Basel

Phone: ++41(0)61 556 54 98

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 05 Apr 2011 - 13:17:53 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 05 Apr 2011 - 14:20:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive