Skip to content

bug in the ctest package: binom.test

3 messages · Mai Zhou, Peter Dalgaard, Kurt Hornik

#
R 0630 for windows
returns a p-value of =< 2.2e-016 and a warning

In Splus 3.4
returns a p-value of 0.0106


I think it is the 

max(v[v<=(1+eps)*PVAL])       causing the problem...

max() of an empty vector.......


Mai Z
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Mai Zhou <mai at ms.uky.edu> writes:
Exactly. And conspiring with the lack of a sanity check in format.pval
causing it to print -Inf as < 2.2e-016...

The fix is as simple as max(0,v[v<=(1+eps)*PVAL])
                            ^^
2 days later
#
I noticed this problem last week.  However, my fix is different, because
binom.test() now computes p-values using the ``sum of probs of all y not
more likely (``more extreme'') than the observed x'' principle (which is
also what fisher.test() now does consistently).

An updated version of ctest will shortly be uploaded to CRAN.

-k
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._