How to get T-values from Tukey's HSD in R

Hello all,

I've been using the following function to do a Tukey's test, but I can't seem to get the T-values. Could someone provide me the code to do get it? Thank you!

TukeyHSD(sod.aov)
Tukey multiple comparisons of means
95% family-wise confidence level

Fit: aov(formula = sodium ~ treatment, data = sod)

$treatment
diff lwr upr p adj
Hour.24-freshwater 57.6 46.93178 68.268225 0.0000000
Hour.48-freshwater 36.9 26.23178 47.568225 0.0000000
Hour.6-freshwater 25.0 14.33178 35.668225 0.0000016
Hour.48-Hour.24 -20.7 -31.36822 -10.031775 0.0000432
Hour.6-Hour.24 -32.6 -43.26822 -21.931775 0.0000000
Hour.6-Hour.48 -11.9 -22.56822 -1.231775 0.0238256

fm1 <- aov(breaks ~ wool + tension, data = warpbreaks)
thsd <- TukeyHSD(fm1, "tension", ordered = TRUE)
broom::tidy(thsd)
#> # A tibble: 3 x 7
#>   term    contrast null.value estimate conf.low conf.high adj.p.value
#>   <chr>   <chr>         <dbl>    <dbl>    <dbl>     <dbl>       <dbl>
#> 1 tension M-H               0     4.72   -4.63       14.1     0.447  
#> 2 tension L-H               0    14.7     5.37       24.1     0.00112
#> 3 tension L-M               0    10.      0.647      19.4     0.0336

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.