Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Dimitriy V. Masterov" <dvmaster@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
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/