View source: R/format_results.R
| format_summary | R Documentation |
Extracts key statistics from a fitted earth model including coefficients, basis functions, R-squared, GCV, GRSq, and RSS.
format_summary(earth_result)
earth_result |
An object of class |
A list containing:
Data frame of model coefficients and basis functions.
Training R-squared.
Generalized cross-validation value.
Generalized R-squared (1 - GCV/variance).
Residual sum of squares.
Number of terms in the pruned model.
Number of predictors used in the final model.
Number of observations.
Cross-validated R-squared (if CV was used, else NA).
result <- fit_earth(mtcars, "mpg", c("cyl", "disp", "hp", "wt"))
summary_info <- format_summary(result)
summary_info$r_squared
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.