2021年5月5日星期三

Error in solve.default(H, g[!fixed]) : system is computationally singular: reciprocal condition number = 7.50953e-17

I am trying to run a mlogit in R using a travel diary of ridehailing trips. The dependent variable is solo vs. pool (e.g., UberX vs. UberPOOL) (See screenshot of the data after applying mlogit.data. Each person (id) did different numbers of trips. Age and Income are individual-specific variables, "Taxi_type_payment" (how the person paid the ride) is trip-specific, and "DUR" is the duration of the trip.

f <- mFormula(choice ~ DUR | HH_income + Age +Taxi_type_payment | 0)  f1 <- mFormula(choice ~ 0|Taxi_type_payment + HH_income + Age + DUR|0)  ml <- mlogit(f1, data, reflevel="1")  

mlogit runs with mformula f1 and does not with formula f. f gives the following error:

Error in solve.default(H, g[!fixed]) : system is computationally singular: reciprocal condition number = 7.50953e-17  

I would appreciate any help to understand why.

Thank you.

enter image description here

https://stackoverflow.com/questions/67410592/error-in-solve-defaulth-gfixed-system-is-computationally-singular-recip May 06, 2021 at 09:01AM

没有评论:

发表评论