Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
"Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk> |

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

Subject |
RE: st: RE: Display of Shea's partial R^2 in ivreg2 output |

Date |
Sun, 28 Feb 2010 19:31:08 -0000 |

Tom, > -----Original Message----- > From: owner-statalist@hsphsun2.harvard.edu > [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Tom Palmer > Sent: 28 February 2010 18:04 > To: statalist@hsphsun2.harvard.edu > Subject: Re: st: RE: Display of Shea's partial R^2 in ivreg2 output > > Thank you very much Mark. > > I only tend to use a single endogenous variable. I ran a few > examples and the AP R^2 seems to be the same as the Shea R^2 > in this case. That's right, they are numerically equivalent in the case of a single endogenous variable. > I would still be interested in seeing the AP R^2 in the > output with the first/ffirst options. Well, there's only so much space in the output. Of the various possibilities - 1st stage F, 1st stage R-sq, Shea R-sq, AP F (=weak ID test statistic), AP R-sq, AP chi-sq (=underidentification test statistic) - we went for first-stage F and the two formal test stats. Angrist and Pischke don't actually recommend (or even discuss) the partial R-sq corresponding to their F test stat. Personally, I think the F and chi-sq are more useful than the R-sq since they come with p- or critical values. But there's no accounting for taste. If you really want the AP R2, you can get it in the saved e(first) matrix. Cheers, Mark > best regards, > Tom > > > On Fri, February 26, 2010 8:04 pm, Schaffer, Mark E wrote: > > Tom, > > > > The answer to this is interesting because it turns out that Shea's > > partial R-sq is very closely related to the R-sq that is a > byproduct > > of calculating the Angrist-Pischke first-stage F-stats. > > > > Specifically, here is how you calculate the AP partial R-sq vs. the > > Shea partial R-sq: > > > > A-P R-sq: > > > > 1. Get the fitted values of the uninteresting endogenous > regressors. > > 2. Partial (1) out of the endogenous regressor of interest. > > 3. Partial (1) out of the excluded instruments. > > 4. Regress (2) on (3). > > 5. R-sq is AP R-sq. > > > > Shea partial R-sq > > > > 1. Get the fitted values of the uninteresting endogenous > regressors. > > 2. Partial the ACTUAL uninteresting endogenous vars out of the > > endogenous regressor of interest. > > 3. Partial (1) out of the excluded instruments. > > 4. Regress (2) on (3). > > 5. R-sq is Shea R-sq. > > > > Below is a demonstration with the toy auto dataset. > > > > Because the A-P approach has a sounder theoretical > foundation than the > > Shea approach, we decided to drop the Shea partial R-sq > from the main > > output in favour of the A-P stats. > > > > Cheers, > > Mark > > > > ****************************** > > > > sysuse auto, clear > > > > * AP stat > > > > * 1. Get the fitted values of the uninteresting endogenous > regressors. > > * 2. Partial (1) out of the endogenous regressor of interest. > > * 3. Partial (1) out of the excluded instruments. > > * 4. Regress (2) on (3). > > * 5. R-sq is AP R-sq. > > > > qui reg weight turn trunk length displacement capture > predict double > > weight_hat, xb > > > > qui reg mpg weight_hat > > capture predict double mpg_what_resid, resid > > > > qui reg turn weight_hat > > capture predict turn_what_resid, resid qui reg trunk weight_hat > > capture predict trunk_what_resid, resid qui reg length weight_hat > > capture predict length_what_resid, resid > > > > reg mpg_what_resid turn_what_resid trunk_what_resid > length_what_resid, > > nocons dof(69) di e(r2) > > > > * Shea partial R-sq > > > > * 1. Get the fitted values of the uninteresting endogenous > regressors. > > * 2. Partial the ACTUAL uninteresting endogenous vars out of the > > endogenous regressor of interest. > > * 3. Partial (1) out of the excluded instruments. > > * 4. Regress (2) on (3). > > * 5. R-sq is Shea R-sq. > > > > qui reg mpg weight > > capture predict double mpg_wactual_resid, resid > > > > reg mpg_wactual_resid turn_what_resid trunk_what_resid > > length_what_resid, nocons dof(69) di e(r2) > > > > * Check Shea vs AP partial R-sqs from ivreg2 > > > > qui ivreg2 price (mpg weight = turn trunk length > displacement), ffirst > > mat first=e(first) mat APr2=first["APr2",1] mat > > sheapr2=first["sheapr2",1] mat list APr2 mat list sheapr2 > > > > ****************************** > > > >> -----Original Message----- > >> From: owner-statalist@hsphsun2.harvard.edu > >> [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of > Tom Palmer > >> Sent: 26 February 2010 19:48 > >> To: statalist@hsphsun2.harvard.edu > >> Subject: st: Display of Shea's partial R^2 in ivreg2 output > >> > >> Dear Statalist, > >> > >> I put the following query to the authors of -ivreg2-. I'm > posting it > >> here so the answer can be shared on the list. > >> > >> In previous versions of -ivreg2- when specifying the -first- or > >> -ffirst- options Shea's partial R^2 for the instruments > was displayed > >> in the output like the following: > >> > >> Summary results for first-stage regressions > >> ------------------------------------------- > >> > >> Variable | Shea Partial R2 | Partial R2 | F( 1, > >> 4792) P-value > >> zlnfat9 | 0.0082 | 0.0082 | 39.83 > >> 0.0000 > >> > >> > >> I'm not sure when the change was made but in the latest version > >> (3.0.01) the partial R^2 is no longer shown with these options. (I > >> know it is still available in the returned > >> -e(first)- matrix.) > >> > >> I find the partial R^2 very useful in comparing the strength of > >> different instruments so I was wondering if it would it be > possible > >> reintroduce the display the partial R^2 in the output of future > >> versions? (I accept typing "mat list e(first)" after > -ivreg2- is not > >> too onerous!) > >> > >> I also take this opportunity to thank you for an extraordinarily > >> comprehensive command. > >> > >> best regards, > >> > >> Tom > >> > >> > >> * > >> * 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/ > >> > > > > > > -- > > Heriot-Watt University is a Scottish charity registered > under charity > > number SC000278. > > > > > > * > > * 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/ > -- Heriot-Watt University is a Scottish charity registered under charity number SC000278. * * 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/

**References**:**st: Display of Shea's partial R^2 in ivreg2 output***From:*"Tom Palmer" <Tom.Palmer@bristol.ac.uk>

**st: RE: Display of Shea's partial R^2 in ivreg2 output***From:*"Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk>

**Re: st: RE: Display of Shea's partial R^2 in ivreg2 output***From:*"Tom Palmer" <Tom.Palmer@bristol.ac.uk>

- Prev by Date:
**RE: st: Repeated time values within panel in levpet STATA output** - Next by Date:
**st: System GMM and fixed effects - xtabond2** - Previous by thread:
**Re: st: RE: Display of Shea's partial R^2 in ivreg2 output** - Next by thread:
**st: percent symbols in catplot** - Index(es):