Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

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


From   "Tom Palmer" <[email protected]>
To   [email protected]
Subject   Re: st: RE: Display of Shea's partial R^2 in ivreg2 output
Date   Sun, 28 Feb 2010 18:03:36 -0000 (GMT)

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.

I would still be interested in seeing the AP R^2 in the output with the
first/ffirst options.

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: [email protected]
>> [mailto:[email protected]] On Behalf Of Tom Palmer
>> Sent: 26 February 2010 19:48
>> To: [email protected]
>> 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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index