0
votes

I have a data set that is formatted according to mlogit's standards using mlogit.data command in Rstudio.

         Trip  SevereEarthquake  Night  Age  Mode
1.NTG    1     0                 0      18   FALSE
1.TGNV   1     0                 0      18   FALSE
1.TGV    1     0                 0      18   TRUE

After some variable creation which I do not include here to make the question short, I ran a multinomial logit model using the code below and it worked fine.

mlogit(Mode ~ SE.TGV + SE.TGNV + AGE.NTG, data, reflevel = "NTG")

However when I define nests in the code (as below) to do a nested logit model I get an error:

mlogit(Mode ~ SE.TGV + SE.TGNV + AGE.NTG, data, reflevel = "NTG", 
       nests = list(notrip = "NTG", trip = c("TGV","TGNV")))

Error in solve.default(crossprod(attr(x, "gradi")[, !fixed])) : system is computationally singular: reciprocal condition number = 8.87901e-37

What is causing this problem? How can I solve this?

1

1 Answers

0
votes

Error messages involving 'computationally singular' will arise if two of your variables are ,within tolerance, collinear ie are expressing the same thing. This suggests you need to examine how the nested variables relate to one another and how they relate to the other variables via some correlation checks.