se.contrast.aov(object, contrast.obj, coef=contr.helmert(ncol(contrast))[, 1], data=NULL) se.contrast.aovlist(object, contrast.obj, coef=contr.helmert(ncol(contrast))[, 1], data=NULL)
"aov"
or
"aovlist"
, or one that inherits from these classes.
coef
vector specifies the contrast between the cell means. Multiple contrasts are specified in the matrix form; each column of the matrix defines a contrast.
contrast.obj
when it is a list. The
coef
values must sum to zero and have the same length as
contrast.obj
. The default value gives the standard error of the difference between the first and second cell means specified by
contrast.obj
(i.e., the first helmert contrast).
object
.
A typical question in ANOVA models is whether contrasts of treatment means are "significant". The
se.contrast
function returns the classical standard error of these contrasts, based on the residual sum of squares of the anova model.
In multi-strata models, the means are assumed to be computed from the lowest stratum where an effect appears. The standard errors of the contrasts are adjusted for efficiencies, and different standard errors are given when comparisons are made between and within strata. This is relevant in split plot designs, for instance. For more details on efficiencies, see the help file for
eff.aovlist
.
Cochran, W.G., Cox, G.M. (1957). Experimental Designs. New York: Wiley.
gun.aov <- aov(Rounds ~ Method + Physique/Team, data = gun) se.contrast(gun.aov, list(Team == "T1" & Physique == "S", Team == "T2" & Physique == "S"), data = gun) # For all pairwise contrasts between Physiques: attach(gun) PhysiqueS <- (Physique == "S")/sum(Physique == "S") PhysiqueA <- (Physique == "A")/sum(Physique == "A") PhysiqueH <- (Physique == "H")/sum(Physique == "H") detach("gun") cont <- cbind(PhysiqueS - PhysiqueA, PhysiqueS - PhysiqueH, PhysiqueA - PhysiqueH) dimnames(cont)[[2]] <- paste(c("S", "S", "A"), "and", c("A", "H", "H")) se.contrast(gun.aov, contrast = cont)