0
votes

I'm trying to deal with the package mlogit in R to build up a transportation-mode choice model. I searched similar problems but I've not found anything.

I have a set of 3 alternatives (walk, auto, transit) in a logit model, with alternative specific variables (same parameters for different alternatives) and individual alternative specific variables (ex: 0(if no)/1(if yes) home-destination trip, just for walk mode).

I'd like to have an intercept in only one of the alternatives (auto), but I'm not able to do this. Using reflevel, that refers to only one of the alternatives, I get two intercepts.

    ml.data <- mlogit(choice ~ t + cost | dhome, mode, reflevel = "transit")

This is not working as I wish.

Moreover, I'd like to set the alternative specific variables as I said before. Insert them in part 2 of mlogit formula takes me two parameter values, but I'd like to have just one parameter, for the mentioned alternative.

Could anyone help me?

2

2 Answers

1
votes

You cannot do what you want. It's not a question of mlogit in particular, it's a question of how multinomial logistic regression works. If your dependent variable has 3 levels, you will have 2 intercepts. And you have to use the same independent variables for the whole model (that's true for all methods of regression).

0
votes

However, referring to the second part of the question (" individual alternative specific variables (ex: 0(if no)/1(if yes) home-destination trip, just for walk mode") I tried to modify the dataset by inserting 3 columns (dhome.auto [all zeros], dhome.transit [all zeros] and dhome.walk [0 if no / 1 if yes it's a home-destination trip]) in order to obtain this variable effective just for walk mode, even if it's now traited as an alternative specific variable. Then

    ml.data <- mlogit(choice ~ t + cost + dhome, mode, reflevel = "transit")

it's a kind of a trick, but it seems to work