2
$\begingroup$

I am running multinomial logit model using mlogit in R. The model includes 3 alternatives as the dependent variable and 4 individual specific predictors. Sample size is 50. The three of them are of class:factor while the other predictor is in class numeric.

When I run model with ONLY 3 class factor predictors it works OK. But when I include numeric predictor along with the above three predictors it returns the following error in R.

mlogit_model<-mlogit(y ~ 1| x1+x2+x3+x4, data=dat_long, reflevel = "3")

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

What could be the reason for this error? I searched for this and found several related posts online, but in this case multi-collinearity eg would not be the cause because the problem with numeric and factor variables.

Any help would be much appreciated.

$\endgroup$
4
  • $\begingroup$ In relation to your first question, issues relating to multicollinearity (which crops up in statistical models frequently) are addressed in numerous posts on site; after some search and research you might want to reformulate that first question to ask about whatever remains that is not clear. Questions related to how to do things in R that are not directly about statistical issues are generally off topic -- ctd $\endgroup$
    – Glen_b
    Commented Apr 24, 2017 at 2:34
  • $\begingroup$ ctd,,, "what code do I use" is usually off topic, but "why does this happen" might be on-topic. In short, you should either edit to focus on the statistical issues (in which case it might reopen here) or edit to focus on the computing aspects -- which might be on topic at stackoverflow (and then flag to migrate) $\endgroup$
    – Glen_b
    Commented Apr 24, 2017 at 2:36
  • $\begingroup$ @Glen_b Edited and hope it fulfills the criteria. $\endgroup$
    – sriya
    Commented Apr 24, 2017 at 3:52
  • $\begingroup$ It's more clearly within the scope of our topics but as it stands it's covered by our many threads on multicollinearity as already indicated. Please check out the linked search (questions on multicollinearity in regression GLMs and so on are all relevant to what's going on here). If you can find an aspect of what's happening not covered there, then re-edit. $\endgroup$
    – Glen_b
    Commented Apr 24, 2017 at 4:04

0

Browse other questions tagged or ask your own question.