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, statalist.org is already up and running.


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

Re: st: predict after mlogit estimation


From   Richard Williams <richardwilliams.ndu@gmail.com>
To   statalist@hsphsun2.harvard.edu, statalist@hsphsun2.harvard.edu
Subject   Re: st: predict after mlogit estimation
Date   Fri, 16 Mar 2012 06:49:10 -0500

At 04:09 AM 3/16/2012, Chiara Mussida wrote:
Thank you Richard,
this seems to be the solution. Anyway, is it possible to check whether
the results obtained for p1 p2 p3 are the ones I need (male
coefficients*female individual characteristics)?
Male coefs are in the stata output, whilst female characteristics in
my dataset. Should I compute the product between the coefs in the
output and the average individual characteristics of female?

Thanks to you all
chiara

If you want a 2nd opinion, try

use "http://www.indiana.edu/~jslsoc/stata/spex_data/ordwarm2.dta";, clear
mlogit warm yr89 white age ed prst if male == 1
predict p1 p2 p3 p4 if male==0
sum p1 p2 p3 p4
margins if male == 0, noesample predict(outcome(1))
margins if male == 0, noesample predict(outcome(2))
margins if male == 0, noesample predict(outcome(3))
margins if male == 0, noesample predict(outcome(4))

Note that this is NOT the same as plugging in the average individual characteristics of females. If you wanted to do that, the commands would be

margins if male == 0, noesample predict(outcome(1)) atmeans
margins if male == 0, noesample predict(outcome(2)) atmeans
margins if male == 0, noesample predict(outcome(3)) atmeans
margins if male == 0, noesample predict(outcome(4)) atmeans
* verify that female means were used by margins
sum yr89 white age ed prst if male==0

With the first approach, you are computing a prediction for each case and then averaging the predictions. With the 2nd approach, you are computing the predicted value for a person who had average values on all the independent variables. I generally prefer the first approach. It often doesn't make that much difference in practice, but sometimes it will.

If you want yet a 3rd opinion, I suppose you could do the calculations for a few cases, or write your own gen command instead of using predict.


-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME:   (574)289-5227
EMAIL:  Richard.A.Williams.5@ND.Edu
WWW:    http://www.nd.edu/~rwilliam

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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