他们使用一些不同的预设。您可以通过应用多重测试校正并使用替代格式的 p 值来获得相同的结果dunn.test
:
dunn.test(x=mtcars[,"wt"], g= mtcars[,"cyl"], method = 'bonferroni', altp = TRUE)$P.adjusted
Kruskal-Wallis rank sum test
data: x and group
Kruskal-Wallis chi-squared = 22.8067, df = 2, p-value = 0
Comparison of x by group
(Bonferroni)
Col Mean-|
Row Mean | 4 6
---------+----------------------
6 | -1.836259
| 0.1990
|
8 | -4.755941 -2.221605
| 0.0000* 0.0789
alpha = 0.05
Reject Ho if p <= alpha
posthoc.kruskal.dunn.test(x=mtcars[,"wt"], g=mtcars[,"cyl"], p.adjust.method="bonferroni")
Pairwise comparisons using Dunn's-test for multiple
comparisons of independent samples
data: mtcars[, "wt"] and mtcars[, "cyl"]
4 6
6 0.199 -
8 5.9e-06 0.079
P value adjustment method: bonferroni