Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

Re: st: Simulating Multinomial Logit in Stata

From   Maarten Buis <>
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
Reichpietschufer 50
10785 Berlin
*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index