I have 3 variables R&D Spend, Administration and Marketing spends. I wanted to calculate VIF and eliminate a variable for better fit to the model.
I tried to use the solution at
[8.3845707545599613, 4.0264055178945535, 7.5939835926809236] dropping 'R&D Spend' at index: 0 [3.4365296868536528, 3.4365296868536528] Remaining variables: Index([u'Administration', u'Marketing Spend'], dtype='object')
on the same data
Variance Inflation Factors Minimum possible value = 1.0 Values > 10.0 may indicate a collinearity problem RDSpend 2.469 MarketingSpend 2.327 Administration 1.175 VIF(j) = 1/(1 - R(j)^2), where R(j) is the multiple correlation coefficient between variable j and the other independent variables