Output scalar summary statistics for an lm()
regression in "tidy"
format. This function is a wrapper function for broom::glance()
.
Arguments
- model
an
lm()
model object- digits
number of digits precision in output table
If TRUE, return in print format suitable for R Markdown
Examples
library(moderndive)
# Fit lm() regression:
mpg_model <- lm(mpg ~ cyl, data = mtcars)
# Get regression summaries:
get_regression_summaries(mpg_model)
#> # A tibble: 1 × 9
#> r_squared adj_r_squared mse rmse sigma statistic p_value df nobs
#> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 0.726 0.717 9.64 3.10 3.21 79.6 0 1 32