model_stats: model_stats

model_statsR Documentation

model_stats

Description

Return a named list of estimates, standard errors, and p-values for one or more regression models.

Usage

model_stats(...)

Arguments

...

Either a single regression model object, or multiple named models, e.g., m1 = m1, m2 = m2, ...

Details

Uses the tidy functions from broom and broom.mixed to return a named list of model stats that can be easily used inline in rmarkdown documents.

Value

A named list of model parameters and statistics

See Also

reexports glue

Examples

## Not run: 
if(interactive()){
 m1 <- lm(mpg ~ hp, mtcars)
 m2 <- lm(mpg ~ wt, mtcars)
 x <- model_stats(m1 = m1, m2 = m2)
 
 x$m1$hp$estimate
 x$m1$hp$str # formatted beta coefficient with 95% CI.
 }

## End(Not run)

grasshoppermouse/hagenutils documentation built on Dec. 6, 2024, 8:31 p.m.