Turn R model objects into tidy tibbles
open sourceMITfree
broom is an R package that summarizes statistical models as tidy tibbles. It has three verbs: tidy() gives one row per model component (such as regression coefficients), glance() gives a one-row summary of the whole model, and augment() adds per-observation information such as fitted values and residuals to a dataset. It tidies over 100 kinds of models from popular modelling packages and almost all model objects from base R's stats package, and it's part of the tidymodels collection.
Problems it solves
- get regression coefficients out of an R model as a data frame
- compare many fitted models side by side in R
- plot model results with ggplot without hand-parsing summary() output
Features
- tidy() returns model components, such as coefficients, as a tibble
- glance() returns a one-row summary of a whole model
- augment() adds fitted values, residuals and other per-observation information to the data
- methods for 100+ model types, including almost all of base R's stats models
