我想计算x> x的单侧p值。使用scipy.stats.mannwhitneyu函数:
u_value, p_value = scipy.stats.mannwhitneyu(x, y)
然而,没有任何地方可以指定替代假设。在R中,可以使用:
wilcox.test(x, y, alternative = 'greater')
。
有没有人知道是否可以使用scipy或任何其他包在python中执行此操作?
答案 0 :(得分:4)
从Scipy 0.17.0开始,您现在可以scipy.stats.mannwhitneyu(x, y, alternative='greater')
。