Statalist The Stata Listserver


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

Re: st: Predict after binary outcome models


From   "Arne Risa Hole" <arnehole@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Predict after binary outcome models
Date   Wed, 13 Sep 2006 14:04:42 +0100

Hi Georgios

As long as you use the xb option following predict you get xb rather
than F(xb), which is the default.

Another way to calculate xb would be to use the -matrix score- command as in:

sysuse auto
probit foreign weight mpg
matrix b = e(b)
matrix score xb = b

Hope this helps.

Arne



On 13/09/06, gmc107@york.ac.uk <gmc107@york.ac.uk> wrote:
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/

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