Consider the output from two different r packages, rms::vif
and car::vif
:
model <- glm(Survived ~ ., family = "binomial", data = Titanic)
rms::vif(model)
Class2nd Class3rd ClassCrew SexFemale AgeAdult Freq
1.482212 1.533078 1.474158 1.118509 1.426962 1.571872
car::vif(model)
GVIF Df GVIF^(1/(2*Df))
Class 1.063587 3 1.010327
Sex 1.118509 1 1.057596
Age 1.426962 1 1.194555
Freq 1.571872 1 1.253743
I believe the typical multicollinearity procedure is as follows:
- Calculate VIF for the model.
- Identify vars with VIF > 5; remove one at a time (highest first); re-check VIF and repeat procedure until VIF(all_vars) < 5.
However, does this procedure differ in the case of calculating VIF for each level of a factor variable (e.g. Crew here has four levels: 1st, 2nd, 3rd, and Crew)?
Let's pretend the output of rms::vif
was
rms::vif(model)
Class2nd Class3rd ClassCrew SexFemale AgeAdult Freq
5.482212 1.533078 1.474158 1.118509 1.426962 1.571872
Do we still remove Class
entirely or is better to just remove the level Class_2nd
and then re-check VIF?
rms::vif()
will always be dependent on what the reference level is for the factor variable, but the output ofcar::vif()
will be unchanged. However, it is still unclear (at least to me) whether or not we should remove a level or if looking at by-level VIFs has any merit in the decision to remove or include the factor as a whole, re-group the factor, or remove one or more levels. In addition, it begs the question of what's the point of looking at by-level VIF such asrms::vif()
? $\endgroup$