| plot_residuals | R Documentation |
Creates a two-panel diagnostic plot: residuals vs fitted values and a Q-Q plot of residuals.
plot_residuals(earth_result, response_idx = NULL)
earth_result |
An object of class |
response_idx |
Integer or |
A ggplot2::ggplot object showing residuals vs fitted values.
Use plot_qq() for the Q-Q plot separately.
result <- fit_earth(mtcars, "mpg", c("cyl", "disp", "hp", "wt"))
plot_residuals(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.