I am trying to estimate a nested multinomial logit model for transportation mode in R. I am using the following model.
data("TravelMode",package="AER") TravelMode <- mlogit.data(TravelMode,choice="choice",shape="long",alt.var="mode",chid.var="individual") TravelMode$avinc <- with(TravelMode,(mode=='air')*income) nl.TM <- mlogit(choice ~ wait + gcost + avinc, TravelMode, reflevel = "car", nests = list(fly = "air", ground = c("train", "bus", "car")), unscaled=TRUE) summary(nl.TM)
My Question: How do you indicate a variable is to be considered in the branches (Fly vs Ground) as opposed to the within the twigs (Air, Train, Bus, Car) in the
mlogit function in R? As you can see from the specified model above, all the variables are dumped into the model without consideration as to when the variables matter in the decision tree.