Tidy a(n) ANOVA table

tidy_anova(x, model = FALSE)

Arguments

x

an object containing the results returned by a model fitted with lm().

model

Logical indicating whether the model-level partitioning (TRUE) or term-level partitioning (FALSE; default) should be used

Value

A data.frame with columns for the source of variation, degrees of freedom, Sum of Squares, Mean Squares, F-statistics, and p-values

Examples

lm.1 = lm(mpg ~ 1 + hp + wt, data = mtcars)
tidy_anova(lm.1, model = TRUE)
#>      Source df       SS         MS        F            p
#> 1     Model  2 930.9994 465.499716 69.21121 9.109047e-12
#> 2 Residuals 29 195.0478   6.725785       NA           NA