I know 3 ways to perform a Tukey post-hoc test in R and the results are a little different.

Initially, I performed a two-way anova

fitmpd <- aov(mpd ~ 植物*处理)

I'm interested in the 处理 factor Then, I performed a Tukey post-hoc in 3 different ways:

  1. summary(glht(fitmpd,linfct=mcp(处理="Tukey"))) glht tukey post-hot test

  2. TukeyHSD(fitmpd,"处理") tukeyHSD tukey post-hot test

  3. HSD.test(fitmpd,"处理",console = T) HSD.test tukey post-hot test

Then I found that all results are different among them.

Can anyone please tell me which one is right?

  • $\begingroup$ glht does not perform Tukey's test. The "Tukey" in the function call simply tells glht to compare each treatment to each other treatment, by using "Tukey contrasts". glht or emmeans are probably better than Tukey's test for routine use, as Tukey's test explicit assumptions about the distribution of the data, and glht or emmeans can be applied to a variety of model types. $\endgroup$ Oct 22, 2018 at 17:13

1 Answer 1


There are a few basic differences among your tests.

Tests 1. (glht) and 2. (TukeyHSD) are the same. However, the glht test employs a p-value adjustment method (described as the simple-step method), whereas TukeyHSD does not use p-value adjustment methods by default.

Tests 2. (TukeyHSD) and 3. (HSD.test) give the same results. Note that the TukeyHSD only shows that b statistically differs from ck, which is the same result given by the HSD.test.

  • $\begingroup$ glht and TukeyHSD are not the same. $\endgroup$ Oct 22, 2018 at 16:57
  • $\begingroup$ The glht is using the Tukey test as multiple comparisons, as set by the option linfct=mcp(处理="Tukey") $\endgroup$ Oct 22, 2018 at 22:28
  • $\begingroup$ I don't think that's correct. That's not what "Tukey" means in that function. $\endgroup$ Oct 22, 2018 at 22:31
  • $\begingroup$ Then, what it means? I'm confused with this, now $\endgroup$ Oct 22, 2018 at 22:37
  • 1
    $\begingroup$ It's just telling the function to compare all levels of the variable. You can look at the documentation for glht which discusses mcp, or look at other examples with mcp where it is used to define the contrasts of interest. $\endgroup$ Oct 22, 2018 at 23:16

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