Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: predict observed yhat and not latent yhat after bitobit


From   "Scott Merryman" <scott.merryman@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: predict observed yhat and not latent yhat after bitobit
Date   Thu, 3 Apr 2008 07:58:27 -0500

Since -bitobit- is a user written command you should try contacting
the author as he may not be a member of Statalist.

At least the -tobit- model you can calculate the other predicted
values (pr(a,b),  e(a,b),  ystar(a,b) ) from the fitted values

For example:

sysuse auto,clear
tobit mpg gear, ll(17)
predict p, pr(17,.)
predict e, e(17,.)
predict yst, yst(17,.)

predict yhat,xb
local l ((17-yhat)/_b[/sigma])
gen my_p  = normprob(-(17-yhat)/_b[/sigma])
gen my_e = yhat + _b[/sigma]*normalden(`l')/normal(-`l')
gen my_yst = my_p*my_e + (1-my_p)*17

sum p my_p e my_e yst my_yst

Scott

On Thu, Apr 3, 2008 at 3:06 AM, Kidist Gebreselasie <wawuye@yahoo.com> wrote:
> Dear statalisters,
> would you please help me out with a stata command to
> predict observed y (yhat) and not latent y (y*hat)
> after a bitobit. The 'predict yhat, equation()'
> command seems to predict y*hat as it produces -,+ and
> 0 predicted values. I am interested in predicting the
> observed yhat which I thought should take only
> non-negative predicted values. I appreciate any
> suggestions.
>
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index