get_regression_summaries: Get regression summary values

View source: R/regression_functions.R

get_regression_summariesR Documentation

Get regression summary values

Description

Output scalar summary statistics for an lm() regression in "tidy" format. This function is a wrapper function for broom::glance().

Usage

get_regression_summaries(model, digits = 3, print = FALSE)

Arguments

model

an lm() model object

digits

number of digits precision in output table

print

If TRUE, return in print format suitable for R Markdown

Value

A single-row tibble with regression summaries. Ex: r_squared and mse.

See Also

glance(), get_regression_table(), get_regression_points()

Examples

library(moderndive)

# Fit lm() regression:
mpg_model <- lm(mpg ~ cyl, data = mtcars)

# Get regression summaries:
get_regression_summaries(mpg_model)

moderndive documentation built on Sept. 11, 2024, 9:26 p.m.