I am trying to find the VIFs for the Faraway package's divusa data using the following model. Any assistance in this matter is greatly appreciated.
Here is my code:
lmod <- lm(divorce ~ unemployed + femlab + marriage + birth + military, divusa)
x <- model.matrix(lmod)
x <- model.matrix(lmod)[,-1]
e <- eigen(t(x) %*% x)
Here is the error I get every time I run my code.
Error: $ operator is invalid for atomic vectors