I'd like to create a multinomial logit regression and thus I should check multicollinearity and autocorrelation. All my variables are nominal scale with four categories. I found the perturb package in R for testing multicollinearity. I tried it and got the following output for a multinomial logit model with one independent variable a.

> a<-sample(4,100,TRUE)
> c<-sample(4,100,TRUE)
> required(car)


> a<-as.ordered(a)
> c<-as.factor(c)
> test<-multinom(c~a)
[1] "normal"

       (Intercept)     a2     a3      a4
  [1,]   0.3629135 19.35080 14.24745 -9.612242
  [2,]  -2.7724858 22.16780 19.90884 -7.518942
  [3,] -16.1600014 13.67588 31.78219 26.503249

I also called the summary output:

summary(pert.1, dec.places = 3, full = TRUE)
 Category ~ c13 
 Category ~ c13 

Impact of perturbations on coefficients:
              mean   s.d.     min    max
(Intercept) -6.190  7.177 -16.160  0.363
a2        18.398  3.537  13.676 22.168
a3        21.979  7.319  14.247 31.782
a4         3.124 16.581  -9.612 26.503

Do you know how to interpret this output? Is there a formula for testing autocorrelation?

There is another function to control the collinearity, but I got an error massage


colldiag(mod = multinom(c~a), scale = FALSE, center = FALSE, add.intercept = TRUE)
# weights:  20 (12 variable)
initial  value 241.215219 
iter  10 value 116.300246
iter  20 value 113.703102
iter  30 value 113.686744
iter  40 value 113.685795
iter  50 value 113.685662
final  value 113.685659 
Index   Variance Decomposition Proportions
1  1.000 1.000    
Warning message:
In is.na(object) : is.na() applied to non-(list or vector) of type 'NULL'

Is it not possible to do this for ordinal data?

  • $\begingroup$ Or is there another possibility to check autocorrelation for ordinal data? Or do you know some tests for multicollinearity? It would be great to get some input. Thank you very much $\endgroup$ – user2685139 Sep 23 '13 at 9:22


The issue seems to be that colldiag() needs a model parameter, which is not appended to the model fit by default in multinom(). But if you set model = TRUE in the multinom call, the colldiag function should compute without errors.

a <- sample(4, 100, TRUE)
c <- sample(4, 100, TRUE)
a <- as.ordered(a)
c <- as.factor(c)
colldiag(mod = multinom(c ~ a, model = TRUE), scale = FALSE, 
         center = FALSE, add.intercept = TRUE)


Index   Variance Decomposition Proportions
         intercept X    
1  1.000 0.002     0.141
2  7.255 0.998     0.859

In regards to the output of perturb, I don't have any good answer as to how to interpret the results. The only comment given in the vignette states that

"If collinearity is a serious problem in the data, then the estimates will be unstable and vary strongly."


The dwtest() from {lmtest} should work with multinom() to compute autocorrelation for you, though you will need to convert your factor to a numeric variable.

dwtest(multinom(as.integer(c) ~ a))


      Durbin-Watson test

data:  multinom(as.integer(c) ~ a)
DW = 1.7298, p-value = 0.08517
alternative hypothesis: true autocorrelation is greater than 0

Especially for users of the mlogit function from the {mlogit} package: multinom()from {lmtest} did not work for me, it says in my just downloaded package version that this function doesn't exist. I had to reshape my data from a form fit for the mlogit function to a dataframe form where each item has only one line (instead of the number of potential outcomes per item). Then I could run this code: require(lmtest) dwtest(as.numeric(outcome) ~ predictors, data=dat).

  • $\begingroup$ why would "If collinearity is a serious problem in the data, then the estimates will be unstable and vary strongly"? $\endgroup$ – Metariat Sep 25 '16 at 13:53
  • $\begingroup$ From the vignette: "Perturb works by adding a small random “perturbation” value to selected independent variables, then re-estimating the model. This process is repeated niter times, after which a summary of the means, standard deviation, minimum and maximum of the parameter estimates is displayed. If collinearity is a serious problem in the data, then the estimates will be unstable and vary strongly". $\endgroup$ – Johan Larsson Sep 26 '16 at 10:59
  • $\begingroup$ @Metariat A consequence of collinearity is that some variables will appear as insignificant, when they would be significant if no collinear variable was present. In the most extreme case, perfect collinearity, the system matrix is not invertible, and so the computation of the estimates is unstable. $\endgroup$ – Anna SdTC Mar 14 '17 at 8:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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