if (FALSE) { # require("multcomp") && require("broom")
amod <- aov(breaks ~ wool + tension, data = warpbreaks)
wht <- multcomp::glht(amod, linfct = multcomp::mcp(tension = "Tukey"))
tidy(wht) # recommended
fortify(wht)
ggplot(tidy(wht), aes(contrast, estimate)) + geom_point()
ci <- confint(wht)
tidy(ci) # recommended
fortify(ci)
ggplot(tidy(confint(wht)),
aes(contrast, estimate, ymin = conf.low, ymax = conf.high)) +
geom_pointrange()
smry <- summary(wht)
tidy(smry) # recommended
fortify(smry)
ggplot(mapping = aes(contrast, estimate)) +
geom_linerange(aes(ymin = conf.low, ymax = conf.high), data = tidy(ci)) +
geom_point(aes(size = adj.p.value), data = tidy(smry)) +
scale_size(transform = "reverse")
cld <- multcomp::cld(wht)
tidy(cld) # recommended
fortify(cld)
}
Run the code above in your browser using DataLab