0

I'am trying to do a multinomial logistic regression with categorical dependent variable using r, so before starting the logistic regression I want to check multicollinearity with all independents variables expressed as dichotomous and ordinal.

so how to test the multicollinearity in r ?

Can someone help me please.

piyushj
  • 1,546
  • 5
  • 21
  • 29
Asma
  • 51
  • 2
  • 5
  • 1
    have u tried `vif` function from the `car` package? – adibender Jun 24 '16 at 12:33
  • So I do the logistic regression at first then i check the multicollineairty ? – Asma Jun 24 '16 at 12:42
  • It is one possibility. Usually collinearity problems would also be indicated by inflated standard errors of (some) coefficients in the `summary` output of the model. Not sure if `vif` function deals correctly with categorical variables – adibender Jun 24 '16 at 12:47
  • Ok thank you very much – Asma Jun 24 '16 at 13:02

1 Answers1

-1
library(HH)

model <- lm(mpg ~ cyl + qsec, mtcars)
vif(model)
toni057
  • 582
  • 1
  • 4
  • 10
  • 1
    Didn't manage to install `HH` library on ubuntu mashine as `HH` needs a tone of extra packages + external libraries. The example is for linear model whereas question was regarding multinomial model – adibender Jun 24 '16 at 12:49
  • also, what do you need `HH` library for? Does it contain a different `vif` implementation compared to `car` package? – adibender Jun 24 '16 at 12:50
  • I'm on Windows and works like a charm for me. Never used the `car` implementation so I can't tell. This one worked for me just fine. – toni057 Jun 24 '16 at 13:03