lb_anovat_lm: Create Custom ANOVA Table for Linear Regression

View source: R/lb_anovat_lm.R

lb_anovat_lmR Documentation

Create Custom ANOVA Table for Linear Regression

Description

Create a standard ANOVA table for linear regression

Usage

lb_anovat_lm(object, reg_collapse = TRUE, ...)

Arguments

object

a Linear Regression object as returned from stats::lm()

reg_collapse

Logical variable to collapse the elements in the table. Set to FALSE to see each variable and interaction in the model.

...

other potential arguments

Details

This function is by Russell Steel for creating an ANOVA table for a full model linear regression.

Value

a data frame with class anova that shows the Df, SS, MS, F and P for the regression

References

See https://community.rstudio.com/t/overall-anova-table-in-r/97896 and https://community.rstudio.com/t/anova-table-for-full-linear-model/42074/3

Examples

lb_anovat_lm(object = lm(mpg ~ disp * cyl, data = mtcars), reg_collapse = TRUE)
lb_anovat_lm(object = lm(mpg ~ disp * cyl, data = mtcars), reg_collapse = FALSE)

rressler/lbutils documentation built on Oct. 23, 2022, 11:20 p.m.