# Error in mlogit package: system is computationally singular

#### amirh_hassanpour

##### New Member
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.

Code:
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:

Code:
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?