I have run glm and lm on my train dataset successfully. However when I use vif function from car package I get all NA'S for every predictor.
X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16 X17 X18 X19 X20 X21 X22 X23 X24 X25 X26 X27 X28 X29 X30
NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
What is causing this? Data is sensitive so I am not including it.
```{r}
suppressMessages(library(car))
vif(lm_fit)
The variables may be perfectly collinear (aka “aliased”). Check the residuals from summary(your_lm) to see if they are all 0. If so, there are no degrees of freedom, so of course \dots