Consider the output from two different r packages,
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(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?