View source: R/regression_functions.R
| get_regression_summaries | R Documentation |
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)
model |
an |
digits |
number of digits precision in output table |
print |
If TRUE, return in print format suitable for R Markdown |
A single-row tibble with regression summaries. Ex: r_squared and mse.
glance(), get_regression_table(), get_regression_points()
library(moderndive)
# Fit lm() regression:
life_exp_model <- lm(
life_expectancy_2022 ~ gdp_per_capita,
data = un_member_states_2024
)
# Get regression summaries:
get_regression_summaries(life_exp_model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.