导入组合p值测试模块

时间:2015-04-14 15:22:37

标签: python scipy statistics

我正在尝试导入一个模块来进行测试以组合p值,如下所述:

http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.combine_pvalues.html

为:

import scipy.stats as stats
results =stats.combine_pvalues([0.099522,0.049951,0.034767,0.025991,0.000402,0.000387,0.000468,0.013807,0.0062,0.040191])
print results

然而,当我运行它时,我得到:

      1 import scipy.stats as stats
----> 2 results = stats.combine_pvalues([0.099522,0.049951,0.034767,0.025991,0.000402,0.000387,0.000468,0.013807,0.0062,0.040191])
      3 print results
     'module' object has no attribute 'combine_pvalues' 

1 个答案:

答案 0 :(得分:3)

我相信你没有使用最新版本的scipy。运行此命令:

$python -c "import scipy; print scipy.__version__"

并查看您的版本是否为0.15.1。如果没有,你应该升级你的scipy以使用函数combine_pvalues。