tests/regtest-Tukey.R

library("multcomp")

set.seed(290875)

data("warpbreaks")
fm1 <- aov(breaks ~ wool + tension, data = warpbreaks)

TukeyHSD(fm1, "tension", ordered = FALSE)
confint(glht(fm1, linfct = mcp(tension = "Tukey")))
summary(glht(fm1, linfct = mcp(tension = "Tukey")))

TukeyHSD(fm1, "wool", ordered = FALSE)
confint(glht(fm1, linfct = mcp(wool = "Tukey")))
summary(glht(fm1, linfct = mcp(wool = "Tukey")))

Try the multcomp package in your browser

Any scripts or data that you put into this service are public.

multcomp documentation built on July 9, 2023, 3:08 p.m.