mlogit: missing value where TRUE/FALSE needed

前端 未结 2 836
萌比男神i
萌比男神i 2020-12-19 12:47

I have data from a discrete choice experiment (DCE), looking at hiring preferences for individuals from different sectors. that I\'ve formatted into long format. I want to m

相关标签:
2条回答
  • 2020-12-19 13:31

    Answering my own question here as I figured it out.

    R mlogit can't handle when none of the alternatives in a choice set is selected. R also needs the data ordered properly, each alternative in a choice set must be in a row. I hadn't done that due to some data management. Interestingly, Stata can handle both of these conditions, so that's why my Stata commands worked.

    As an aside, for those interested, Stata's asclogit and R's mlogit give the exact same results. Always nice when that happens.

    0 讨论(0)
  • 2020-12-19 13:33

    You may need to use mlogit.data() to shape the data. There's an examples at ?mlogit. Hope that helps.

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