Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: How to understand the linear prediction after -heckman-?


From   [email protected]
To   statalist<[email protected]>
Subject   st: How to understand the linear prediction after -heckman-?
Date   Tue, 29 Sep 2009 01:38:17 +0800

Dear statalists,
In my mind, the result of -heckman- is the same as the result of -reg- with lambda as an additional independent variable. However, I found something different.
I typed the following in the stata, and the related results are as followings.


. qui heckman wage educ age, select(married children educ age) twostep mills(mill)

. qui predict double yheck if wage!=.

. qui corr yheck wage if wage!=.

. di r(rho)^2
.2512235

. qui reg wage educ age mill if wage!=.

. qui predict double yreg if wage!=.

. qui corr yreg wage if wage!=.

. di r(rho)^2
.27934983

. su yheck yreg

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
       yheck |      1343    21.96174    3.717985   14.79669   32.88486
        yreg |      1343    23.69217    3.332614   16.22861   33.78897


The predicted value should be the same and the R-squared should be the same too.


Why different? 

Hope for any help and thank you very much.



Best regards,

Rose.
 

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index