Kruskal-Wallis test with details on pairwise comparisons

后端 未结 4 946
日久生厌
日久生厌 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:37

    Unfortunately I don't know of a function like this. If there isn't one already, it would be an interesting task to construct a function that returns a matrix with all pairwise treatment comparisons. A contrast is considered significant if the following inequality is satisfied


    (source: statsdirect.com)

    where T is the Kruskal-Wallis test statistic for k samples, S^2 is the denominator of the T statistic, N is the total number (all ni) and Ri is the sum of the ranks (from all samples pooled) for the ith sample, and t is a quantile from the Student t distribution on N-k degrees of freedom.

    I know I didn't help much :)
    I am also waiting for a better answer

提交回复
热议问题