可以在Scipy中的Mann-Whitney U检验中指定替代假设吗?

我想计算x的单侧p值;使用scipy.stats.mannwhitneyu函数:

u_value, p_value = scipy.stats.mannwhitneyu(x, y)

但是,没有地方可以指定替代假设.在R中,可以使用:

wilcox.test(x,y,Alternative =’greater’).

有谁知道是否可以使用scipy或任何其他软件包在python中执行此操作?

解决方法:

从Scipy 0.17.0开始,您现在可以执行scipy.stats.mannwhitneyu(x,y,Alternative =’greater’).

上一篇:python-NumPy-将数组重塑为一维


下一篇:python-重新采样并调整numpy数组的大小