Statalist The Stata Listserver


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

st: Predict after binary outcome models


From   gmc107@york.ac.uk
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Predict after binary outcome models
Date   Wed, 13 Sep 2006 13:47:59 +0100

Dear Statalisters,
I am using the following code to generate the probit generalised residual:

Probit y x1 x2 x3
Predict lamdaz, xb
By id: gen ei=((2*y[1]-1)normalden(lamdaz))/normal((2*y[1]-1)*lamdaz)

Where y[1] is just the value of the dependent variable in t=1.

I am not sure, however, if I am using the right code as the predict  newvar
command creates the probability F(xb) after probit where F(xb)= normal(xb).
Doesn't this mean that the denominator in the expression for ei above:
normal((2*y[1]-1)*lamdaz) is actually wrong and corresponds to something
like normal((2*y[1]-1)*normal{lamdaz})???
Is there anyway to isolate xb ? The only thing I know is that myprobit_d0
uses mleval 'xb'='b' and then gen 'lj'=norm('xb') if $ML_y1==1 ,but, have
not got any idea of how to proceed and isolate xb.
Would be most grateful if anyone could help me on this.
Georgios


*
*   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