Which type of Mlogit.data should I use

I am now trying to do mlogit and I have taken some references in mlogit.data: data.frame for logit model in mlogit: Multinomial Logit Models (rdrr.io). However, I think these examples doesn't fit my model.

For example, My model has travelers, each of them has a rank, but the rank is just based on the number of shop and scenery (and other variables), but not a specific place (line 2 and line 4 is not the same place).

Traveler | Fav Rank | Shop | Scenery |
1 | 1 | 2 | 4 |
1 | 2 | 1 | 2 |
2 | 1 | 4 | 5 |
2 | 2 | 7 | 3 |

So I want to get the rank based on the variables, should I use mlogit.data? If yes, how can I correct my code?

mdata <- mlogit.data(data=data,
choice='Fav Rank',
//alt.levels = c("plane", "train", "bus", "car"), # I am not sure whether to delete it or not, as my model doesn't bound to 4 specific methods

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.