aovtype2: Anova Tables for Type 2 sums of squares

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/aovtype2.R

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

1
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

1
2
3
4
5
mtcars$cyl <- factor(mtcars$cyl)
mtcars$am <- factor(mtcars$am)
mod <- aov(hp ~ cyl * am, data = mtcars)
aovtype2(mod)
  

CGPfunctions documentation built on Nov. 12, 2020, 5:08 p.m.