model_fit_stats | R Documentation |
Returns lm and glm model fit statistics R-squared, adjusted R-squared, predicted R-squared, PRESS, AIC, and BIC. Thanks to John Mount for his 6-June-2014 blog post, R style tip: prefer functions that return data frames" for the idea http://www.win-vector.com/blog/2014/06/r-style-tip-prefer-functions-that-return-data-frames
model_fit_stats(...)
... |
One or more |
A data frame containing containing the R-squared, adjusted R-squared, Predictive R-squared, PRESS, AIC, and BIC statistics for each model, with a row for each supplied model.
## Not run: m1_lm <- lm(mpg ~ disp + hp + drat + wt + qsec, data = mtcars) m2_lm <- lm(mpg ~ disp + wt, data = mtcars) m3_lm <- lm(mpg ~ hp + drat + qsec, data = mtcars) m1_glm <- glm(mpg ~ disp + wt + qsec, data = mtcars) model_fit_stats(m1_lm, m2_lm, m3_lm, m1_glm) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.