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

后端 未结 1 987
滥情空心
滥情空心 2020-12-16 04:50

I have a conjoint survey data in long format. the first few rows look like this:

 ID alt choice size tar length brand flavor gender age yr_smoke num_smoke jo         


        
相关标签:
1条回答
  • 2020-12-16 05:27

    I think the problem is because you did not define right your individual specific variables. According to the package manual, when you build your models with mlogit function you can use : | to separate the alternative specific with individual specific variables. For example:

    fit_mlogit_ct11 <- mlogit(choice~1|size+tar+length+brand+flavor, 
                               data_mlogit_ct1_test1,shape="long",chid.var="ID",
                               alt.var="alt",method="bfgs",heterosc=TRUE,tol=10)
    

    Which simply says that all your variables are individual specific and your take only the intercept for the alternative specific. But indeed as it has already mentioned above your data look odd since they look the same, since you have only individual specific variables. This leads eventually to singularity (your variables correlate with each other with 1).

    0 讨论(0)
提交回复
热议问题