Output scalar summary statistics for an lm()
regression in "tidy"
format. This function is a wrapper function for broom::glance()
.
get_regression_summaries(model, digits = 3, print = FALSE)
an lm()
model object
number of digits precision in output table
If TRUE, return in print format suitable for R Markdown
A single-row tibble with regression summaries. Ex: r_squared
and mse
.
# NOT RUN {
library(moderndive)
# Fit lm() regression:
mpg_model <- lm(mpg ~ cyl, data = mtcars)
# Get regression summaries:
get_regression_summaries(mpg_model)
# }
Run the code above in your browser using DataLab