model.summary.table function

Generate a Summary Table for a Linear Model

Generate a Summary Table for a Linear Model

This function creates a summary table for a linear model, including coefficients, standard errors, p-values, and model statistics (e.g., MSE, R-squared). The table is formatted for LaTeX output using the kableExtra package.

model.summary.table(model, caption)

Arguments

  • model: A linear model object (e.g., output from lm()).
  • 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 model model <- lm(mpg ~ wt + hp, data = mtcars) # Generate the summary table model.summary.table(model, caption = "Linear Model Summary")
  • Maintainer: Aidan J. Wagner
  • License: MIT + file LICENSE
  • Last published: 2025-03-24

Useful links