tukey.1df {dae}R Documentation

Performs Tukey's one-degree-of-freedom-test-for-nonadditivity


Performs Tukey's one-degree-of-freedom-test-for-nonadditivity on a set of residuals from an analysis of variance.


tukey.1df(aov.obj, data, error.term="Within")



An aov object or aovlist object created from a call to aov.


The term from the Error function whose residuals are to be tested for nonadditivity. Only required when the Error function used in call to aov, so that an aovlist object is created.


A data.frame containing the original response variable and factors used in the call to aov.


A list containing Tukey.SS, Tukey.F, Tukey.p, Devn.SSq being the SSq for the 1df test, F value for test and the p-value for the test.


In computing the test quantities fitted values must be obtained. If error.term is specified, fitted values will be the sum of effects extracted from terms from the Error function, but only down to that specified by error.term.The order of terms is as given in the ANOVA table. If error.term is unspecified, all effects for terms external to any Error terms are extracted and summed.

Extracted effects will only be for terms external to any Error function. If you want effects for terms in the Error function to be included, put them both inside and outside the Error function so they are occur twice.


Chris Brien

See Also

fitted.errors, resid.errors in package dae.


## set up data frame for randomized complete block design in Table 4.4 from 
## Box, Hunter and Hunter (2005) Statistics for Experimenters. 2nd edn 
## New York, Wiley.
RCBDPen.dat <- fac.gen(list(Blend=5, Flask=4))
RCBDPen.dat$Treat <- factor(rep(c("A","B","C","D"), times=5))
RCBDPen.dat$Yield <- c(89,88,97,94,84,77,92,79,81,87,87,

## perform the analysis of variance
RCBDPen.aov <- aov(Yield ~ Blend + Treat + Error(Blend/Flask), RCBDPen.dat)

## Obtain the quantities for Tukey's test
tukey.1df(RCBDPen.aov, RCBDPen.dat, error.term = "Blend:Flask")

[Package dae version 3.2-13 Index]