0
$\begingroup$

I am evaluating the levels of thyroid hormones and thyroid antibodies in 3 groups namely: pre-eclamptic pregnant women, non-pre-eclamptic pregnant women, and apparently healthy non-pregnant women. Because the data generated is not uniformly distributed, I decided to carry out Kruskal-Wallis Test. I want to report the median but I am confused about which one to report. Is it the one with less than/= to or the one with >?

Answers are highly appreciated in advance.

$\endgroup$
3
  • $\begingroup$ I think you mean 'not normally distributed'. // Not sure what your last sentence mean. if you have 3 groups, report 3 medians. Maybe null hypothesis is $H_0: \eta_1 = \eta_2 = \eta_3$ and alternative is $H:a{ \mathrm{not all} \eta_i \mathrm{equal}.$ // Some people prefer to speak of 'locations' generically, instead of 'medians' specifically. The original K-W test was for medians, but modern software implementations may refer to locations. $\endgroup$
    – BruceET
    Commented Apr 23, 2020 at 23:35
  • $\begingroup$ As far as I can see, the original Kruskal-Wallis test (as presented in their 1952 paper) was not decribed as being "for medians" (nor is a test of medians in general). Neither the introduction nor section 4 on interpretation of the test present it that way from what I can see with a quick read. $\endgroup$
    – Glen_b
    Commented Apr 25, 2020 at 3:53
  • $\begingroup$ Thank you all for the answers so far. I appreciate. $\endgroup$
    – user282452
    Commented Apr 26, 2020 at 17:26

1 Answer 1

2
$\begingroup$

Example using data simulated in R.

set.seed(1234)
x1 = rgamma(15, 3, .6)
x2 = rgamma(15, 3, .6) + .5
x3 = rgamma(15, 3, .6) + 2
x = c(x1,x2,x3);  g = rep(1:3, each=15)

In R, the K-W test output does not mention $H_0,$ which is rejected for my example, with P-value 0.025. You can use two-sample Wilcoxon tests to see which pairs of medians differ significantly.

kruskal.test(x ~ g)

        Kruskal-Wallis rank sum test

data:  x by g
 Kruskal-Wallis chi-squared = 7.4025, df = 2, p-value = 0.02469

Boxplots show sample medians:

 boxplot(x ~ g, col="skyblue2", pch=20)

enter image description here

From the simulation, we know that the population medians are $\eta_1 = 4.457, \eta_2 = 4.857, \eta_3 = 6.457.$

qgamma(.5, 3, .6)
[1] 4.456767

here are the sample medians:

median(x1);  median(x2);  median(x3)
[1] 4.215075
[1] 4.568092
[1] 6.14665

According to a 2-sample Wilcoxon test, the sample medians $H_1$ and $H_3$ differ significantly. If you do several such ad hoc tests you need to use some method to help avoid false discovery (such as Bonferroni).

wilcox.test(x1, x2)$p.val
[1] 0.6235943
wilcox.test(x1, x3)$p.val
[1] 0.01855373
$\endgroup$
1
  • 1
    $\begingroup$ Good answer. +1. My only comment is that I would recommend using a post-hoc test designed for the K-W test rather than use pairwise Wilcoxon-Mann-Whitney tests. Pairwise W-M-W tests in particular can lead to funky results that are difficult to interpret in aggregate. Appropriate post-hoc tests include Dunn test (1964), Conover test, and Nemenyi test. In R, these tests are available in the PMCMRplus package and others. $\endgroup$ Commented Feb 11, 2022 at 10:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.