Rs wilcox.test
可以采用不同的长度向量,但是scipy.stats
的wilcoxon不能:我收到unequal N
错误消息。
from scipy.stats import wilcoxon
wilcoxon(range(10), range(12))
有没有办法在Python中获得Rs行为?
最佳答案
根据R docs:
Performs one- and two-sample Wilcoxon tests on vectors of data; the latter is also known as ‘Mann-Whitney’ test.
所以就用
from scipy.stats import mannwhitneyu
mannwhitneyu(range(10), range(12))
# (50.0, 0.26494055917435472)
关于Python wilcoxon : unequal N,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/33890367/