Summary of an Analysis of Variance Object

DESCRIPTION:
Computes a standard ANOVA table for the model. Optionally, the terms in the anova model can be split into separate terms for specified contrasts. The intercept can be included in the anova table.

USAGE:
summary.aov(object, intercept = F, split = NULL, expand.split = T)
summary.aovlist(object, split = NULL, expand.split = T)

REQUIRED ARGUMENTS:
object:
a model object which inherits from the class aov or aovlist.

OPTIONAL ARGUMENTS:
intercept:
logical flag: if TRUE, the variance attributed to the intercept term is included. This only applies to single strata models.
split:
a list with an element for each model term that is to be subdivided. Each element of split must be named, with a name matching the treatment terms in the model (as used to label the lines of the ANOVA table). Each element of split is also a list, specifying the grouping of contrasts for that term. (Each term has k degrees of freedom. Each of these k degrees of freedom have a corresponding contrast, used in the model fitting.) The grouping is specified by a list of (some of) the integers 1:k. Contrasts corresponding to integers in the same element of the list will be summed.
expand.split:
logical flag: if TRUE, the split is propagated down the hierarchy. If FALSE, the split is restricted to the terms specified in split. This argument is ignored if split is not given.

VALUE:
summary.aov returns an object of class "anova", which inherits from "data.frame". This object contains an ANOVA table.

summary.aovlist returns an object of class "listof" which contains objects of class "anova".


DETAILS:
This is a method for the function summary for objects inheriting from class aov.

The split argument is particularly useful for testing significance of polynomial terms. For instance, suppose the 4 level ordered factor Sulphur is fitted using the default contrasts contr.poly. Specifying split=list(Sulphur=list(L=1,Q=2,C=3) in the call to summary, will give a summary table with 4 lines summarising the Sulphur main effect: a 3 degree of freedom line for the overall effect of Sulphur, then three 1 degree of freedom lines, one for each of the linear, quadratic and cubic contrasts of sulphur. The sum of squares in the 3 one degree of freedom lines add up to the 3 degree of freedom term. Any higher order terms for which Sulphur is marginal will be similarly split. Alternatively, specifying split=list(Sulphur=list(L=1,rem=2:3) will give a summary table with 3 lines summarising the Sulphur main effect: a 3 degree of freedom line for the overall effects of Sulphur, then a 1 degree of freedom line for the linear effect and a 2 degree of freedom line for the remainder.


REFERENCES:
Cochran, W. and Cox, G. (1957). Experimental Designs. Wiley, New York.

SEE ALSO:
aov , summary .

EXAMPLES:
# Reference Cochran and Cox, pg 164
# 3x3 factorial split into linear and quadratic components
P <- ordered(rep(1:3, rep(3,3)))
N <- ordered(rep(1:3,3))
Plants <- c(449, 413, 326, 409, 358, 291, 341, 278, 312)

# Convert treatment totals over 12 Replicates to treatment means Plants <- Plants/12 cox164.df <- data.frame(Plants, P, N) cox164.aov <- aov(Plants ~ N * P, cox164.df, weight = rep(12,9), qr = T)

summary(cox164.aov)

# Produces the following output: Df Sum of Sq Mean Sq N 2 1016.667 508.3333 P 2 917.389 458.6944 N:P 4 399.278 99.8194

# Dividing both P and N terms into their linear and quadratic part. # Both main terms and interaction are split summary(cox164.aov, split = list(P = list(lin = 1, quad = 2), N = list(lin = 1, quad = 2)))

# Produces the following output: Df Sum of Sq Mean Sq N 2 1016.667 508.333 N: lin 1 1012.500 1012.500 N: quad 1 4.167 4.167 P 2 917.389 458.694 P: lin 1 917.347 917.347 P: quad 1 0.042 0.042 N:P 4 399.278 99.819 N:P: lin.lin 1 184.083 184.083 N:P: quad.lin 1 152.111 152.111 N:P: lin.quad 1 49.000 49.000 N:P: quad.quad 1 14.083 14.083

# Dividing only higher order terms, note that protection of the : in # the list name and that the name 'P:N' will not work summary(cox164.aov, split = list('N:P' = list(lin.lin = 1, quad.terms = 2:4)))

# Produces the following output: Df Sum of Sq Mean Sq N 2 1016.667 508.3333 P 2 917.389 458.6944 N:P 4 399.278 99.8194 N:P: lin.lin 1 184.083 184.0833 N:P: quad.terms 3 215.194 71.7315