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: tobit, margins, and prediction with outcome in logs


From   "Dimitriy V. Masterov" <[email protected]>
To   [email protected]
Subject   Re: st: tobit, margins, and prediction with outcome in logs
Date   Sat, 20 Nov 2010 19:59:48 -0500

Michael,

That is actually exactly what I was looking for. It somehow never
occurred to me to do it all in one step.

For posterity's sake,

E(Y|X,Y>0) Margins:
margins,
expression( exp(predict(xb)+0.5*sigma^2) * (1 -
normal((gamma-predict(xb)-sigma^2)/sigma)) *
1/(1-normal((gamma-predict(xb))/sigma)) ) at(x1=(10(10)100)) over(di);

E(Y|X) Margins:
margins,
expression( exp(predict(xb)+0.5*sigma^2) * (1 -
normal((gamma-predict(xb)-sigma^2)/sigma)) ) at(x1=(10(10)100))
over(di);

DVM


P.S. I am reading your Stata graphics book right now. It's very
helpful and beautiful!
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index