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, ...)
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. |
# 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