montanaflynn / stats

A well tested and comprehensive Golang statistics library package with no dependencies.
MIT License
2.92k stars 168 forks source link

p-value in Fisher's Exact Test is different in output and print #81

Open yancychy opened 11 months ago

yancychy commented 11 months ago

Hi, when I run Fisher's exact test. The print p-value is differenct from the results's p-value. For example, in print, the p-value < 2.2e-16. However, the jk$p.value is 1.899826e-32. Is there any thing wrong in the function? Thank you.

> fm_dn
       Down    No
Yes  281   326
No  4074 13090

jk = janitor::fisher.test(fm_dn)

> jk

    Fisher's Exact Test for Count Data

data:  fm_dn
p-value < 2.2e-16
alternative hypothesis: true odds ratio is not equal to 1
95 percent confidence interval:
 2.343308 3.271687
sample estimates:
odds ratio 
  2.769178 

> jk$p.value
[1] 1.899826e-32
yancychy commented 11 months ago

Could anyone test this results? I tired this in two computers which show same results.