I am currently searching a way to perform a dunn test in R. While doing that I came across multiple functions that have the Dunn test implemented.
library(dunn.test)
library(PMCMR)
dunn.test(x=mtcars[,"wt"], g= mtcars[,"cyl"])$P.adjusted
posthoc.kruskal.dunn.test(x=mtcars[,"wt"], g=mtcars[,"cyl"], p.adjust.method="bonferroni")
The results however are completely different. Does anyone have experience with the dunn.test package? I want to use the Dunns test as a posthoc test after the Kruskal Wallis test.
They use some different pre-sets. You can get identical results by applying a multiple testing correction and using alternative format p-values for the
dunn.test
: