[Rd] prop.test and x = 0 (PR#714)

charlie@stat.umn.edu charlie@stat.umn.edu
Sun, 29 Oct 2000 16:29:58 +0100 (MET)


Full_Name: Charles J. Geyer
Version: 1.1.1
OS: linux-gnu
Submission from: (NULL) (134.84.86.22)


prop.test(0, 30)

95 percent confidence interval:
 0.003043053 0.141320480 

Clearly absurd.  You need theory to be this stupid. :-)

I suggest adding

if (p.c >= 1) p.u <- 1

just after line 59 of the current version of prop.test and

if (p.c <= 0) p.l <- 0

just after line 62 of the current version of prop.test.

With these patches, prop.test produces conservative confidence intervals
for all p and n = 30.  The current version fails catastrophically for 0 < p <
.003
where of course it has actual coverage probability zero.

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._