tukey.wrapper | R Documentation |
Tukey HSD test and simultaneous confidence intervals for all pairs comparisons in factorial designs. The procedure controls the FWER in the strong sense.
tukey.wrapper(model, alpha, factorC)
model |
A fitted model, for example an object returned by lm, glm, or aov etc. It is assumed that coef and vcov methods are available for model. Usually, it is an aov fit |
alpha |
The significance level |
factorC |
Specifies a factor |
this function, it is possible to compute all pairs comparisons for expectations and simultaneous confidence intervals in factorial linear models. Hereby, the all-pairs comparisons can be performed for user given effects. The overall variance is estimated by the linear model as well as the degree of freedom used by the studentized range distribution.
A list containing:
adjPValues |
A numeric vector containing the adjusted pValues |
rejected |
A logical vector indicating which hypotheses are rejected |
confIntervals |
A matrix containing the estimates and the lower and upper confidence bound |
errorControl |
A Mutoss S4 class of type |
Frank Konietschke et al.
data(warpbreaks)
# Tukey contrast on the levels of the factor "Tension"
tukey.wrapper(aov(breaks ~ tension, data = warpbreaks), factorC="tension",alpha=0.05)
# Two-way anova with interaction
tukey.wrapper(aov(breaks ~ tension*wool, data = warpbreaks),alpha=0.05,factorC="tension")
# Two-way anova without interaction
tukey.wrapper(aov(breaks ~ tension+wool, data = warpbreaks),alpha=0.05,factorC="tension")
tukey.wrapper(aov(breaks ~ tension, data = warpbreaks),alpha=0.05,factorC="tension")
data(iris)
tukey.wrapper(lm(Sepal.Length ~ Species, data=iris),alpha=0.05, factorC="Species")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.