TukeyHSD.lm | R Documentation |
TukeyHSD()
requires use of aov()
.
Since this is a hindrance for beginners, wrappers
have been provided to remove this need.
## S3 method for class 'lm'
TukeyHSD(x, which, ordered = FALSE, conf.level = 0.95, ...)
## S3 method for class 'formula'
TukeyHSD(
x,
which,
ordered = FALSE,
conf.level = 0.95,
data = parent.frame(),
...
)
x |
an object, for example of class |
which , ordered , conf.level , ... |
just as in |
data |
a data frame. NB: This does not come second in the argument list. |
## These should all give the same results
if (require(mosaicData)) {
model <- lm(age ~ substance, data=HELPrct)
TukeyHSD(model)
TukeyHSD( age ~ substance, data=HELPrct)
TukeyHSD(aov(age ~ substance, data=HELPrct))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.