I performed a kruskal wallis test on multi-treatment data where I compared five different methods.
A friend showed me the calculation in spss and the results included the mean ranks of each method.
In R, I only get the chi2
and df value
and p-value
when applying kruskal.test
to my data set. those values are equal to the ones in spss but I do not get any ranks.
How can I print out the ranks of the computation? My code looks like this:
comparison <- kruskal.test(all,V3,p.adj="bon",group=FALSE, main="over")
If I print comparison I get the following:
Kruskal-Wallis rank sum test
data: all
Kruskal-Wallis chi-squared = 131.4412, df = 4, p-value < 2.2e-16
But I would like to get something like this additional output from spss:
Type H Middle Rank
1,00 57 121.11
2,00 57 148.32
3,00 57 217.49
4,00 57 53.75
5,00 57 174.33
total 285
How do I get this done in r?
dunn.test
in R. I'm not sure how to get the median ranks out of thekruskal.test
object. Sorry. – Tad Dallas