-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathReadme.Rmd
53 lines (38 loc) · 1.68 KB
/
Readme.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
title: "A shiny app for exploring regression relations on mtcars data"
author: "Soumyadipta Sarkar"
output: md_document
---
## Introduction
This app creates custom regression model for __mtcars__ dataset.
The user can choose one of the following workflows.
1. 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.
2. 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.
## Packages used
1. shiny
2. shinyjs
3. leaps
4. dplyr
5. ggplot2
6. gridExtra
7. grid
## Residual diagnostics
A sample of residual statistics is given below. The diagnostic plot includes
1. Residual vs Fitted Plot
2. Normal Q-Q plot
3. Scale-Location plot
4. Cook's distance
5. Residual vs Leverage Plot
6. Cook's distance vs Leverage $$h_{ii}/(1-h_{ii})$$
![Residual diagnostics](Residual_diag.PNG)
## Reference
1. [Playing with ggplot2](https://rpubs.com/therimalaya/43190) by Raju Rimal
2. Weisberg, S., 2005. [Applied linear regression](http://www.ru.ac.bd/wp-content/uploads/sites/25/2019/03/304_03_Weisberg-Applied-Linear-Regression-Wiley-2013.pdf) (Vol. 528). John Wiley & Sons.
3. [Shiny](https://cran.r-project.org/web/packages/shiny/index.html)
4. [leaps: Regression Subset Selection](https://cran.r-project.org/web/packages/leaps/leaps.pdf)