View source: R/ols-resid-vs-regressor-plot-shiny.R
rvsr_plot_shiny | R Documentation |
Graph to determine whether we should add a new predictor to the model already containing other predictors. The residuals from the model is regressed on the new predictor and if the plot shows non random pattern, you should consider adding the new predictor to the model.
rvsr_plot_shiny(model, data, variable, print_plot = TRUE)
model |
An object of class |
data |
A |
variable |
Character; new predictor to be added to the |
print_plot |
logical; if |
model <- lm(mpg ~ disp + hp + wt, data = mtcars)
rvsr_plot_shiny(model, mtcars, 'drat')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.