0

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?

dan1st
  • 12,568
  • 8
  • 34
  • 67
Gio
  • 1
  • 1

2 Answers2

1

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).

Peter Flom
  • 2,008
  • 4
  • 22
  • 35
  • Thanks for your answer Peter. Maybe the question is not clearly exposed, I'm sorry but I'm a student. I know I can have a maximum number of (n-1) modal variable as my reference book says, and that's true also for individual variables that don't vary across alternatives. I can't understand why I cannot have less than (n-1) variable, I thought it should be possible to carry out a model like this. – Gio Jul 25 '17 at 07:08
  • Because that's how multinomial logistic regression works. But the intercept is usually not of interest, anyway. – Peter Flom Jul 25 '17 at 10:26
0

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

Gio
  • 1
  • 1