regression_summaries: Summaries of regression models

conf_intervalR Documentation

Summaries of regression models

Description

The summaries are always in the form of a data frame

  • conf_interval() — displays coefficients and their confidence intervals

  • R2() — R-squared of a model together with related measures such as F, adjusted R-squared, the p-value, and degrees of freedom used in calculating the p-value.

  • regression_summary() – A regression report in data-frame format.

  • anova_summary() — An ANOVA report in data-frame format. If only one model is passed as an argument, the data frame will have one line per model term. If multiple models are given as arguments, the ANOVA report will show the increments from one model to the next.

Usage

conf_interval(model, level = 0.95, show_p = FALSE)

R2(model)

regression_summary(model)

anova_summary(...)

Arguments

model

A model as produced by model_train(), lm(), glm(), and so on

level

Confidence level to use in conf_interval() (default: 0.95)

show_p

For conf_interval(), append the p-value to the report.

...

One or more models (for ANOVA)

Details

Many of these are wrappers around broom::tidy() used to emphasize to students that the results are a summary in the form of a regression report, similar to the summaries produced by stats::confint(), stats::coef(), etc.

Value

a data frame

Examples

Model <- CRDS |> model_train(FEV ~ age + smoker)
Model |> conf_interval()
Model |> R2()
Model |> anova_summary()


LSTbook documentation built on April 3, 2025, 6:02 p.m.