mnlogit R Package: Dealing with unavailable alternatives

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

mnlogit R Package: Dealing with unavailable alternatives

Emily Yifan
Hello,

I am trying to use the mnlogit package to estimate an MNL model. However, in my case some of the alternatives in my alternative set are not always available to a person. To illustrate, I have a total of 5 alternatives, but for chooser_1 only alternative number 1, 2 and 3 are available. On the other hand, for chooser_2, only alternative number 2, 3 and 5 are available.

A solution I found on the internet suggests me to add another variable to indicate the alternative availability. However, the output parameters from the estimated model is not anywhere close from the real parameters that I used to generate an artificial data. My artificial data is similar to the table below:




Moreover, sometimes in my real data a person does not choose any option. I would like some suggestions on how to tackle this. I thought about creating an alternative that would represent not choosing any of the alternatives, and I think this would work, but I would like to know if the package can already handle this on its own, because my real data has approximately half million observations, and adding another alternative is very memory consuming.

Finally, since I've been failing to obtain good results with this package, I thought that I might be specifying my multinomial logit model incorrectly. Here's the relevant code:

    fm <- formula(MODE ~ INCENTIVE - 1 | ALT | AVAIL)
    myMLogitData <- mlogit::mlogit.data(artificialData, choice = "MODE",
                                shape = "long", alt.levels = c(1,2,3,4,5),
                                id.var = "CHOOSER_ID")
    fit <- mnlogit::mnlogit(fm, myMLogitData, ncores = 8 )

I meant to define 1 alternative independent parameter, associated with Incentive variable, and 2 alternative specific variables, associated with the alternatives and their availability. However, I have been struggling about whether the AVAIL variable should be included in the formula.


Thank you!