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: Simulating Multinomial Logit in Stata


From   Maarten Buis <[email protected]>
To   [email protected]
Subject   Re: st: Simulating Multinomial Logit in Stata
Date   Tue, 12 Mar 2013 18:19:04 +0100

On Tue, Mar 12, 2013 at 6:03 PM, Ali Hashemi wrote:
> Many thanks for sharing your helpful code. But aren't you creating
> your choice variable (y) exactly the same way as I proposed which is
> by comparing the cumulative probabilities (p1, p1+p2, ...) with a
> random number (u)?

Your use of the term CDF made me think that you meant(*) cumulating
over individuals rather than within individuals.

However, you seem to create your probabilities differently, and thus
would still not reproduce the results from -mlogit-. If you have three
outcomes, than in a -mlogit- settup you will have two linear
predictors (xb2 and xb3), and your predicted probabilities are
p1=1/(1+exp(xb2) + exp(xb3)), p2 = =exp(xb2)/(1+exp(xb2) + exp(xb3)),
and p3 = =exp(xb3)/(1+exp(xb2) + exp(xb3)). Your post could be
interpreted as either you have 1 linear predictor or as many as there
are categories, and neither will work.

But if in doubt, why not try? That is the beauty of simulation.

-- Maarten

(*) This is often the most difficult part of email list

---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany

http://www.maartenbuis.nl
---------------------------------
*
*   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