R是一个著名的库,用于排列测试,即perm。 我感兴趣的例子是这个:
x <- c(12.6, 11.4, 13.2, 11.2, 9.4, 12.0)
y <- c(16.4, 14.1, 13.4, 15.4, 14.0, 11.3)
permTS(x,y, alternative="two.sided", method="exact.mc", control=permControl(nmc=30000))$p.value
哪些打印结果的p值为:0.01999933
。
请注意,函数permTS允许我们输入置换次数= 30000。
Python中是否有类似的实现?
我正在查看Python的perm_stat
,但这不是我要找的,并且似乎存在错误。
... diff <= ...
。[1] - Jared Wilber