tukey.wrapper: Tukey HSD test and simultaneous confidence intervals for all...

Description Usage Arguments Details Value Author(s) Examples

View source: R/Tukey.R

Description

Tukey HSD test and simultaneous confidence intervals for all pairs comparisons in factorial designs. The procedure controls the FWER in the strong sense.

Usage

1
tukey.wrapper(model, alpha, factorC)

Arguments

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

Details

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.

Value

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 errorControl, containing the type of error controlled by the function.

Author(s)

Frank Konietschke et al.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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")

mutoss documentation built on May 2, 2019, 5:56 p.m.