[Limdep Nlogit List] Nested Logit 51 choices

William Greene wgreene at stern.nyu.edu
Thu Jun 3 02:43:04 EST 2010


Shane. (1) Your command lines are too long. See the
modification below. (2) you did not specify utility
functions for the choices, (3) I'm not sure your model
specification adequately describes the setup you 
described. According to your command, each consumer 
will face the first nij choices among the 51. This
does not sound right. I think there should be a third
variable in your ;LHS specification. If this is an
unlabeled choice set, however, then ignore my point 3.
Please see your manual for details.
/B. Greene
----- Original Message -----
From: "Shane L. Martin" <slmartin at mitre.org>
To: limdep at limdep.itls.usyd.edu.au
Sent: Wednesday, June 2, 2010 11:31:30 AM GMT -05:00 Colombia
Subject: [Limdep Nlogit List] Nested Logit 51 choices

Hello,

I am currently attempting to estimate a nested logit with choice specific data.  That is, all consumers are representative consumers because I don't know anything about them.  I only know (a lot of) information about the choices that they make.

Essentially, I am doing a conditional logit model, but with a nesting structure.  Consumers choose between nonstop and one-stop flights.  The nonstop flight choice results in a degenerate branch.  Within the one-stop flight branch, there are up to 50 choices, though in practice, nobody faces the full choice set.  Nevertheless, there is a universal choice set.  My data include airfare, distance, circuity, # of runways at the hub airport (n/a for nonstop flights), and some other stuff.  NIJ indicates the number of choices faced by the individual for those lines of data.  For each individual, there are NIJ lines of data with chosen=1 for one line and chosen=0 for NIJ-1 lines of data.

When I run the following command, I get error:
Error    71: Variable list contains a name not in the expected table.
Error   539: Variable list: The unidentifiable string is 51
Error  1012: A choice label in a branch spec. is not in ;CHOICES list
Error  1012: A choice label in a branch spec. is not in ;CHOICES list

Nlogit
;LHS=Chosen, nij
;CHOICES= 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,
         21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,
         41,42,43,44,45,46,47,48,49,50,51
 ;tree=ns(51),ws(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,
       21,22,23,24,25,26,27,28,29,30,31,32,
       33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50)
;MODEL:
U(ws)=bf*RFARE+bd*ITDIST+bc*CIRC+br*RUNWAYS+bn*NONSTOP/
U(ns)=bf*RFARE+bd*ITDIST+bc*CIRC+bn*NONSTOP$

If I instead run the following command (notice the slightly different tree structure), I get error:
Error  1009: Expected [ in limb specification was not found.
Error  1009: Expected [ in limb specification was not found.

Nlogit
;LHS=Chosen, nij
;CHOICES=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51
;tree=Type[ns(51),ws(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50)]
;MODEL:
U(ws)=bf*RFARE+bd*ITDIST+bc*CIRC+br*RUNWAYS+bn*NONSTOP/
U(ns)=bf*RFARE+bd*ITDIST+bc*CIRC+bn*NONSTOP$


I was hoping that someone on this list could shed some light on this issue.  Thanks. --Shane

Shane L. Martin, Ph.D.
Economist
The MITRE Corporation
Center for Advanced Aviation System Development
703-983-3902
slmartin at mitre.org

_______________________________________________
Limdep site list
Limdep at limdep.itls.usyd.edu.au
http://limdep.itls.usyd.edu.au


More information about the Limdep mailing list