0
$\begingroup$

My data set contains few varibales which I converted to factor as I wanted them to be in that format. To start with, I wanted to check the importance of each variable and check for multicollinearity. But when I run code, I get NA values for all those factor variables. enter image description here

Does vif doesn't work for categorical variables?

$\endgroup$

1 Answer 1

4
$\begingroup$

Variance Inflation Factors are defined on the level of regressors. A categorical factor with $k$ levels will (usually) be dummy-coded into $k-1$ separate boolean dummies, so you might, if at all, get $k-1$ VIFs.

However, collinearity between categorical data is much less well understood than collinearity between numerical regressors. See also here: Collinearity between categorical variables So I wouldn't be surprised if your software package made a conscious decision not to output VIFs for categorical data.

$\endgroup$
2
  • $\begingroup$ say if i don't convert them into factors manually and just run VIF on raw data, would that be a good step to know variable importance? $\endgroup$ Commented Jun 16, 2017 at 13:15
  • 2
    $\begingroup$ VIF is not defined for categorical data. You cannot run VIF on it. $\endgroup$ Commented Jun 16, 2017 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.