summary.aov
Summary of an Analysis of Variance Object

Description

Computes a standard ANOVA table (sequential sums of squares) analysis for the model. Optionally, the terms in the aov object can be split into separate terms for specified contrasts. The intercept can be included in the anova table.

Usage


summary.aov(object, intercept = FALSE, split, expand.split = TRUE, 
    keep.zero.df = TRUE, ...) 

summary.aovlist(object, ...)

## S3 method for class 'summary.aov': print(x, digits = max(3, getOption("digits") - 3), symbolic.cor = FALSE, signif.stars = getOption("show.signif.stars", default = TRUE), ...) ## S3 method for class 'summary.aovlist': print(x, ...)

Arguments

object a model object that inherits from class "aov" or class "aovlist".
intercept logical flag: should the variance attributed to the intercept be included? This option applies only to single strata models. By default, intercept=FALSE.
split a list with one element for each model term that is to be subdivided. Each element of split must have a name matching the treatment terms in the model (as used to label the lines of the ANOVA table). Each element of split is itself a list specifying the grouping of contrasts for the named term: i.e., each term has k degrees of freedom, and each of the k degrees of freedom has a corresponding contrast that is used in the model fitting. The grouping of contrasts is specified by a list from the integers 1:k. Contrasts corresponding to integers in the same element of the list are summed.
expand.split logical flag: should the split be propagated down the hierarchy? If expand.split=FALSE, the split is restricted to the terms specified in the split argument. This option is ignored if split is not given. By default, expand.split=TRUE.
keep.zero.df logical flag: should the terms with zero degree freedom be kept? The default value is TRUE.
... other arguments passed in to or returned from the function. For summary.aovlist, some arguments in (...) may be same as the ones of summary.aov arguments.

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 gives a summary table with 4 lines summarizing the Sulphur main effect: a 3 degrees of freedom line for the overall effect of Sulphur, followed by three 1 degree of freedom lines, one each for the linear, quadratic and cubic contrasts of Sulphur. The sums of squares in the three 1 degree of freedom lines add up to the 3 degrees of freedom term. Any higher order terms for which Sulphur is marginal are similarly split. Alternatively, specifying split=list(Sulphur=list(L=1,rem=2:3)) gives a summary table with 3 lines summarizing the Sulphur main effect: a 3 degrees of freedom line for the overall effect of Sulphur, followed by a 1 degree of freedom line for the linear effect and a 2 degrees of freedom line for the remainder.
Value
The summary.aov function returns an object of class "summary.aov", "listof", which contains a list of objects with class "anova", "data.frame", each object contains an ANOVA table.
The summary.aovlist function returns an object of class "summary.aovlist", which contains a list of objects. For each object, it is the result of call to summary for each element of object.
References
Cochran, W. and Cox, G. (1957). Experimental Designs. New York: Wiley.
SAS Institute, Inc. (1990). SAS/Stat User's Guide (4th Edition). SAS Institute, Inc.: Cary, NC.
See Also
aov, model.tables, 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, data = cox164.df, weights = 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 the 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

# For aovlist object cox164.aovlist <- aov(Plants ~ N * P + Error(N/P), data = cox164.df) summary(cox164.aovlist) # Produces the following output: # Error: N # Df Sum Sq Mean Sq # N 2 84.722 42.361 # # Error: N:P # Df Sum Sq Mean Sq # P 2 76.449 38.225 # N:P 4 33.273 8.318

Package stats version 6.0.0-69
Package Index