【发布时间】:2018-09-07 04:03:18
【问题描述】:
我使用的是 scipy 1.0.0 版。
import scipy as sp
x = [[5829225, 5692693], [5760959, 5760959]]
sp.stats.fisher_exact(x)
对于上面的值,scipy 不返回任何内容,而是等待。 这可能是什么原因? 我该如何解决?
但是在 R 中,它几乎立即返回一个 p 值。
a = matrix(c(5829225,5692693,5760959,5760959), nrow=2)
fisher.test(a)
【问题讨论】:
-
尝试“scipy.stats.fischer_exact(x)”并删除“import scipy as sp”
-
没有变化。它仍然没有返回任何 p 值。 "scipy.stats.fisher_exact(x)" 应该如何改变?
-
我认为对于大 N 来说,实现真的很慢;在我的电脑上,它看起来会完成,但大约需要 20 分钟。当然,你应该考虑一下你是否真的想要Fisher。
-
感谢reporting the issue;看起来像一个错误。
-
@Warren Weckesser,不客气。