On 20-Oct-09 13:34:49, Peng Yu wrote: > fisher.test() gives a very small p-value, which is underflow on my > machine. However, the log of it should not be underflow. I'm wondering > if there is a way get log() of a small p-value. An approximation is > acceptable in this case. Thank you! > >> fisher.test(rbind(c(10000,100000),c(100000,10000000)))$p.value > [1] 0
I have not attempted an exact approach (though may do so later), but the P-value in question is about 1e-15000 so (using log to base e) log(P) approx = -33000 In such a case, P=0 is a pretty good approximation! Which prompts the question: Why the interest in having the value of such a very small number? Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <ted.hard...@manchester.ac.uk> Fax-to-email: +44 (0)870 094 0861 Date: 20-Oct-09 Time: 15:14:26 ------------------------------ XFMail ------------------------------ ______________________________________________ R-help@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.