This function creates a summary table for ANOVA results, including degrees of freedom, sum of squares, mean squares, F-values, and p-values. The table is formatted for LaTeX output using the kableExtra package.
ANOVA.summary.table(model, caption)
Arguments
model: A model object for which ANOVA results are computed (e.g., output from lm() or aov()).
caption: A character string to be used as the caption for the table.
Returns
A LaTeX-formatted table generated by kableExtra::kable().
Examples
# Fit a linear modelmodel <- lm(mpg ~ wt + hp, data = mtcars)# Generate the ANOVA summary tableANOVA.summary.table(model, caption ="ANOVA Summary")