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]

st: Simulating Multinomial Logit in Stata


From   Ali Hashemi <[email protected]>
To   Stata listserv <[email protected]>
Subject   st: Simulating Multinomial Logit in Stata
Date   Mon, 11 Mar 2013 13:06:38 -0400

Dear listserv members,

I'm trying to simulate multinomial logit data in Stata. In this
particular case, each individual has to pick from a set of 10
alternatives defined by a combination of two attributes (x1 and x2).
My question is regarding the way I should create the choice variable.
Here is what I currently do:

1) Calculate the probability of each alternative as exp(XB)/(1+exp(XB))
1) Calculate the cumulative probability of each alternative (CDF) for
each individual
2) Generate a random number (r)  for each individual (which is fixed
across all the alternatives that he faces)
3) The first alternative with the cumulative probability greater than
this random number would the choice. (CDF>r)


I would appreciate your comment on the above procedure. Also, I'm not
clear why don't we simply calculate the probability of each
alternative as exp(XB)/(1+exp(XB)) and then pick the alternative with
highest probability? Your help is much appreciated.

Many thanks
Ali
*
*   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