Skip to content

Multicollinearity: Variance Inflation Factor in R Video

Last Update: March 22, 2022

My online video tutorials are hosted at YouTube channel.

For learning this concept, you can view my online video tutorial: Multicollinearity: Variance Inflation Factor in R.

Video Code

1. Packages

library(AER)
library(MASS)
library(corrplot)

2. Data

data(HousePrices)

3. Variables

ivar <- HousePrices[, 2:5]

4. Multicollinearity

ivaricor <- ginv(cor(ivar))
colnames(ivaricor) <- colnames(ivar)
rownames(ivaricor) <- colnames(ivar)
ivaricor
corrplot(corr = ivaricor, method="number", is.corr=FALSE)

Courses

My online courses are hosted at Teachable website.

For more details on this concept, you can view my Linear Regression in R Course.

My online courses are closed for enrollment.
+