Continue to discuss this topic about multicollinearity in regression. Firstly, it is necessary introduce how to calculate the VIF and condition number via software such as R. Of course it is really easy for us. The vif() in car and kappa() can be applied to calculate the VIF and condition number, respectively. Consider the data from the last article of this series for example
GNP.deflator Unemployed Armed.Forces Population Year
81.946226 35.924858 9.406108 171.158675 1017.609561
> #condition number
From the output, it is clear that both of VIF and condition number are extremely large which means the data exist extremely multicollinearity.
2 Lasso and Least Angle Regression