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

From |
gjhxmu@sina.com |

To |
statalist<statalist@hsphsun2.harvard.edu> |

Subject |
Re: AW: st: RE: How to understand the linear prediction after -heckman-? |

Date |
Wed, 30 Sep 2009 00:19:14 +0800 |

Dear Martin, thank you for your help. I am sorry for my unclear expression. I want to get a R-squared after -heckman- comparable to the OLS regression. In the thread http://n2.nabble.com/st-Re-Stata-Heckman-and-Mills-ratio-tt3707672.html#a3707672, Kit refered to "you can always create an r^2 measure from the squared correlation of actual and predicted observations used in the estimation",which I have known from Wooldridge's book before. Following that, I thougt no matter calculate R-squared from prediction after -heckman- or from prediction after -reg- with mill the results were the same. However,Previously I found they were different and after your help I knew it was something to do with the "mill". I know the result of -heckman- is equal to the result of calculation manually in which first do -probit- then -reg- with mill. Why their predictions are different? Namely, why not include "mill" in the prediction? Only understanding the doubt about the prediction can I manually calculate R-squared. Thank you very much. Best regards, Rose. ----- Original Message ----- From: Martin Weiss <martin.weiss1@gmx.de> To: <statalist@hsphsun2.harvard.edu> Subject: AW: st: RE: How to understand the linear prediction after -heckman-? Date: 2009-9-29 19:14:42 <> I am not quite sure what the question really is. If you want some pseudo-r-squared, look at Nick`s http://www.stata.com/support/faqs/stat/rsquared.html -predict- after -heckman- is quite comprehensive. What do you want in addition to what is already available? Also note the Cameron and Trivedi (2009) book, which deals with -heckman- quite comprehensively. http://www.stata-press.com/books/mus.html See chapter 16.6 HTH Martin -----Urspr黱gliche Nachricht----- Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von gjhxmu@sina.com Gesendet: Dienstag, 29. September 2009 11:22 An: statalist Betreff: Re: st: RE: How to understand the linear prediction after -heckman-? Dear Martin, thank you for your reply and help. Indeed, after leaving "mill" out of my -regress- prediction, the results are the same. However, which one is correct? To add "mill" in the -heckman- prediction or to leave it out of my -regress- prediction if I need to get the prediction and R-squared after -heckman-? Best regards, Rose ----- Original Message ----- From: Martin Weiss <martin.weiss1@gmx.de> To: <statalist@hsphsun2.harvard.edu> Subject: st: RE: How to understand the linear prediction after -heckman-? Date: 2009-9-29 03:03:45 <> You have to leave "mill" out of your -predict-ion... ************** use http://www.stata-press.com/data/r11/womenwk.dta, clear heckman wage educ age, /* */ select(married children educ age)/* */ twostep mills(mill) predict yheck reg wage educ age mill gen yreg=_b[_cons]+_b[educ]*educ + /* */ _b[age]*age su y* compare yheck yreg ************** HTH Martin -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of gjhxmu@sina.com Sent: Montag, 28. September 2009 19:38 To: statalist Subject: st: How to understand the linear prediction after -heckman-? 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/ * * 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/ * * 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/ * * 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/ * * 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/

- Prev by Date:
**Re: st: RE: Treatment of outcome categories in Ologit** - Next by Date:
**st: Need help for chi-square test with survey command** - Previous by thread:
**st: Query re -display request(macmane)-** - Next by thread:
**st: Need help for chi-square test with survey command** - Index(es):

© Copyright 1996–2019 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |