This app creates custom regression model for mtcars dataset.
The user can choose one of the following workflows.
-
The user can choose the Select best model option. In that case, the user may choose the number of variables to be selected for the model. The code will use adjusted R squared value to choose the best model restricted by the number of variables.
-
The user can create the model by choosing the variables to be used. The best model will be chosen from the set of all possible models that these variables can generate.
The options to choose the variables are given in the left panel. The residual statistics are also generated.
- shiny
- shinyjs
- leaps
- dplyr
- ggplot2
- gridExtra
- grid
A sample of residual statistics is given below. The diagnostic plot includes
- Residual vs Fitted Plot
- Normal Q-Q plot
- Scale-Location plot
- Cook’s distance
- Residual vs Leverage Plot
- Cook’s distance vs Leverage hi**i/(1−hi**i)
- Playing with ggplot2 by Raju Rimal
- Weisberg, S., 2005. Applied linear regression (Vol. 528). John Wiley & Sons.
- Shiny
- leaps: Regression Subset Selection