Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Define nested logit with many choices


From   Mauricio Esteban Cuak <[email protected]>
To   [email protected]
Subject   Re: st: Define nested logit with many choices
Date   Sat, 3 Aug 2013 16:23:41 -0500

Still looking for an answer to this, thanks!

2013/7/31 Mauricio Esteban Cuak <[email protected]>:
> Hi,
>
> I'm considering a problem with around 200 alternatives and around 4
> nests each with, say, 50 alternatives.
>
> Consider the example in the help with the built-in dataset restaurant.dta
>
> ****** Begin Code **********
> clear
> version 12
> webuse restaurant.dta
>
> nlogitgen type = restaurant(fast: Freebirds | MamasPizza, family:
> CafeEccell | LosNortenos | WingsNmore, fancy:
>             Christophers | MadCows)
>
> nlogit chosen cost distance rating || type: income kids, base(family)
> || restaurant:, noconst case(family_id)
>
> ****** End Code *************
>
> Suppose however, that I want to define the nests by the variable
> "rating" (by which restaurants are classified), so that each nests
> contains all restaurants that have rating == x.
> In this particular case, it is easy to list all the restaurants that
> fit a certain rating, but what if I have (like in my case) 50
> restaurants per rating level?
>
> I can manually input those restaurant names per category, but there
> must be an easier and less error prone way!
> Thanks for your time,
>
> ME
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index