Peter Dalgaard BSA writes:
Mai Zhou <mai at ms.uky.edu> writes:
library(ctest)
binom.test(7,10,p=0.3, alternative="two.sided")
returns a p-value of =< 2.2e-016 and a warning
In Splus 3.4
binom.test(7,10,p=0.3, alternative="two.sided")
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.......
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])
^^