Exploring how correlation among covariates inflates uncertainty in coefficient estmates.
In multiple regression, strong correlations 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 real-time.
Here’s a little R shiny app that could be used as a starting point for such a supplement: https://mbjoseph.shinyapps.io/vif-sandbox/ 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. Code is on GitHub: https://github.com/mbjoseph/vif
Screenshot:
If you see mistakes or want to suggest changes, please create an issue on the source repository.
Text and figures are licensed under Creative Commons Attribution CC BY 4.0. Source code is available at https://github.com/mbjoseph/mbjoseph.github.io, unless otherwise noted. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".