Kruskal-Wallis test with details on pairwise comparisons

后端 未结 4 938
日久生厌
日久生厌 2020-12-12 23:11

The standard stats::kruskal.test module allows to calculate the kruskal-wallis test on a dataset:

>>> data(diamonds)
>>> kruskal.test(price         


        
4条回答
  •  醉梦人生
    2020-12-12 23:42

    You can use PMCMR package. There is more information about it.

    Spelling_Grades <- c(90,87,89,90,75,88,97,99,78,85,72,76,77,79,70)
    Methods <- c("A","A","A","A","B","B","B","B","B","B","C","C","C","C","C")
    kruskalmc(Spelling_Grades~Methods)
    
    #This method doesn't accept characters that's why I've changed the methods to integer
    Methods <- c(1,1,1,1,2,2,2,2,2,2,3,3,3,3,3)
    posthoc.kruskal.nemenyi.test(Spelling_Grades~Methods) 
    

    The two methods above give same results.

提交回复
热议问题