Model Goodness-of-Fit Statistics
Returns a tidy DataFrame of model-level statistics (e.g. R-squared, AIC, BIC). Supports single model objects or labeled collections of models for comparison. When passed a list or dictionary of models, it stacks the results into a single DataFrame, automatically adding a ‘model’ column if labels are present.
Model): | List[Model] |
Dict[String, Model] The model(s) to inspect.A tidy one-row-per-model summary of goodness-of-fit.
m1 = lm(mpg ~ wt, data = mtcars)
fit_stats(m1)
m2 = lm(mpg ~ hp + wt, data = mtcars)
fit_stats([Model_1: m1, Model_2 = m2])