aovtype2 {CGPfunctions}R Documentation

Anova Tables for Type 2 sums of squares

Description

Calculates and displays type-II analysis-of-variance tables for model objects produced by aov. This is a vastly reduced version of the Anova function from package car

Usage

aovtype2(mod)

Arguments

mod

aov model object from base R.

Details

Details about how the function works in order of steps taken. Type-II tests are invariant with respect to (full-rank) contrast coding. Type-II tests are calculated according to the principle of marginality, testing each term after all others, except ignoring the term's higher-order relatives. This definition of Type-II tests corresponds to the tests produced by SAS for analysis-of-variance models, where all of the predictors are factors, but not more generally (i.e., when there are quantitative predictors).

Value

An object of class "anova", which usually is printed.

Author(s)

John Fox jfox@mcmaster.ca; as modified by Chuck Powell

References

: Fox, J. (2016) Applied Regression Analysis and Generalized Linear Models, Third Edition. Sage.

See Also

aov

Examples


mtcars$cyl <- factor(mtcars$cyl)
mtcars$am <- factor(mtcars$am)
mod <- aov(hp ~ cyl * am, data = mtcars)
aovtype2(mod)
  

[Package CGPfunctions version 0.6.3 Index]