-1

In nested logit models you can define regressors at each level of the tree. In all examples I've read in the manual and additional examples, the regressors are defined only for the last level. I'll use a commonly discussed example, the fishing mode.

Nests:

Shore = { Beach, Pier} , Boat = { Charter, Private}

Say that I have regressors Price, CatchRate, and Income. How do I use Price and CatchRate to explain the last level and Income to explain the first.

In R I can do:

mlogit(choice~price+catch,nests=list(shore=c("pier","beach"),boat=c("charter","private")))

but I don't know where to stick the variable income.

steveb
  • 5,382
  • 2
  • 27
  • 36
user23438
  • 445
  • 3
  • 11
  • 2
    Please don't cross-post (ie [mlogit package R: Question about Nested Logit](http://stats.stackexchange.com/q/221821/7290) on [stats.SE]). That is against SE policy. Decide which site you want to post your question on & delete the other version. – gung - Reinstate Monica Jul 02 '16 at 15:53
  • I apologize. I cross posted because you told me the other forum was not the appropriate place. I'll delete it. – user23438 Jul 02 '16 at 16:08
  • Sorry I cannot delete it anymore because it was voted down :-(. I thought it was a legitimate question. Actually I just found the exact question in the same forum (without answers unfortunately). [link]http://stats.stackexchange.com/questions/113450/nest-varying-parameters-in-nested-logit-model-estimation-mlogit-package[\link] – user23438 Jul 02 '16 at 17:50
  • It isn't about being downvoted (& I didn't downvote you, BTW). You need to register your account on [stats.SE]. Then you will be able to delete your question. – gung - Reinstate Monica Jul 02 '16 at 18:02

1 Answers1

0

The example you're using and the answer to your question are both in the documentation:

## model with charter as the reference level

m <- mlogit(mode ~ price+ catch | income, data = Fish, reflevel = "charter")

## same model with a subset of alternatives : charter, pier, beach

m <- mlogit(mode ~ price+ catch | income, data = Fish,
            alt.subset = c("charter", "pier", "beach"))

## a pure "multinomial model"

summary(mlogit(mode ~ 0 | income, data = Fish))

## which can also be estimated using multinom (package nnet)

library("nnet")
summary(multinom(mode ~ income, data = Fishing))

## a "mixed" model

m <- mlogit(mode ~ price+ catch | income, data = Fish)
summary(m)
Hack-R
  • 22,422
  • 14
  • 75
  • 131
  • Thanks Hack-R but unfortunately that doesn't answer the question. One thing is the multinomial model ("classic", conditional or "mixed") and another the nested logit. Even if I try : mlogit(choice~price+catch|income,nests=list(shore=c("pier","beach"),boat=c("charter","private"))) I get something different from what I want. What I need is a regressor that affects the decision of choosing among nests (not within nests). – user23438 Jul 02 '16 at 16:15