In multiple regression, strong correlation among covariates increases the uncertainty or variance in estimated regression coefficients.
Variance inflation factors (VIFs) are one tool that has been used as an indicator of problematic covariate collinearity.
In teaching students about VIFs, it may be useful to have some interactive supplementary material so that they can manipulate factors affecting the uncertainty in slope terms in realtime.
Here’s a little R shiny app that could be used as a starting point for such a supplement.
Currently it only includes two covariates for simplicity, and gives the user control over the covariate $R^2$ value, the residual variance, and the variance of both covariates.
As usual, the file server.R
defines what you want to actually do in R:
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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 

The file ui.R
defines the user interface:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 

Everything’s ready to fork or clone on Github.
Rbloggers.com offers daily email updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...