I am using the mlogit R package.

For a subset of my dataset, mlogit is learned ok. For another subset of my dataset, I get this error.

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

When I looked for this error in contexts outside of mlogit, one suggested remedy it to use qr.solve() instead of solve.default().

  1. How do I modify mlogit to use qr.solve()?
  2. What in my data can possibly be causing this problem?
  3. Can this error result from a certain category being fully predictable from some attribute?
  4. How do I check?
  • 1
    $\begingroup$ Mlogit is regression model. The most likely problem is that your regressors are linearly related. Using different methods will not change the problem. Supply more details about your data. $\endgroup$ – mpiktas Apr 20 '12 at 6:43
  • $\begingroup$ This error can also come if you specify an alternative-specific variable as being generic. Did you remember to | your formula, as in mlogit(DV ~ Generic | Alt.Spec). Maybe you already checked this. $\endgroup$ – gregmacfarlane Jun 27 '12 at 1:22

Your Answer

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

Browse other questions tagged or ask your own question.