Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

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

From |
Ali Hashemi <hashemi@vt.edu> |

To |
Stata listserv <statalist@hsphsun2.harvard.edu> |

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/

**Follow-Ups**:**Re: st: Simulating Multinomial Logit in Stata***From:*Maarten Buis <maartenlbuis@gmail.com>

- Prev by Date:
**Re: st: probit "backed up"** - Next by Date:
**RE: st: Questions for random data generation and value label** - Previous by thread:
**st: probit "backed up"** - Next by thread:
**Re: st: Simulating Multinomial Logit in Stata** - Index(es):