Bookmark and Share

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]

Re: st: RE: question on ivreg2, ivendog and "good" instruments


From   Masha Zakharova <mzakharo@sfu.ca>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: question on ivreg2, ivendog and "good" instruments
Date   Mon, 11 Mar 2013 23:56:48 -0700 (PDT)

Mark,

Thanks a lot for your help! I tried using endog option, but I received an error:


. ivreg2 valence (subj=OBJ cross) if election==13, cluster(id) endog (subj)
option endog() not allowed

I also added one more instrument here, "cross", which is a dummy variable specifying whether a respondent and a party are on the same or opposite sides from the centre of political spectrum

. ivreg2 valence (subj=OBJ cross) if election==13, cluster(id)  

IV (2SLS) regression with robust standard errors
------------------------------------------------

Number of clusters (id) = 1483                        Number of obs =    10121
                                                      F(  1,  1482) =  3155.18
                                                      Prob > F      =   0.0000
Total (centered) SS     =  11632.76136                Centered R2   =   0.3125
Total (uncentered) SS   =  11633.38803                Uncentered R2 =   0.3125
Residual SS             =  7997.455164                Root MSE      =      .89

------------------------------------------------------------------------------
             |               Robust
     valence |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        subj |  -.2375875   .0042281   -56.19   0.000    -.2458744   -.2293006
       _cons |   .8817051   .0176025    50.09   0.000     .8472049    .9162053
------------------------------------------------------------------------------
Hansen J statistic (overidentification test of all instruments):        96.209
                                                   Chi-sq(1) P-val =   0.00000
------------------------------------------------------------------------------
Instrumented:  subj
Instruments:   OBJ cross
------------------------------------------------------------------------------

Now the Hansen J statistic is stat. significant, which means my instruments are not "good", is that right? Can that be the reason why -endog- option is not working?

Thanks again for your help,
Masha

----- Original Message -----
From: "Mark E Schaffer" <M.E.Schaffer@hw.ac.uk>
To: statalist@hsphsun2.harvard.edu
Sent: Monday, March 11, 2013 2:13:59 PM
Subject: st: RE: question on ivreg2, ivendog and "good" instruments

Masha,

First of all, you'll probably find it  more convenient to use the endog option of ivreg2.  It will report an endogeneity test whose robustness corresponds to that of the main estimation, e.g., if your main equation is cluster-robust, so is the endogeneity test statistic.  For example:

ivreg2 valence (subj=OBJ) if election==13, endog(subj)

Second, you're misinterpreting the Sargan test output.  

> ------------------------------------------------------------------------------
> Sargan statistic (overidentification test of all instruments):           0.000
>                                                  (equation exactly identified)
> ------------------------------------------------------------------------------

means that the test statistic (*not* the p-value, as you state in your email) is zero.

This is because your equation is exactly identified, as stated in the output.  You cannot test the validity of your instruments if your equation is exactly identified - see any econometrics text, or the help file of ivreg2 and the references therein.  (Put another way, you can only get an overidentifying restrictions test if your equation is overidentified.  Yours isn't.)

Third, you probably shouldn't pay much attention to the R-sq.  The R-sq for an IV estimation doesn't have the standard meaning it does with OLS, and it's quite possible to get a negative R-sq (which is what you have).

HTH,
Mark

> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> statalist@hsphsun2.harvard.edu] On Behalf Of Masha Zakharova
> Sent: 11 March 2013 20:30
> To: statalist@hsphsun2.harvard.edu
> Subject: st: question on ivreg2, ivendog and "good" instruments
> 
> Dear Statalist,
> 
> I have a question regarding ivreg2 and ivendog, and I would really appreciate
> some help, since it seems to me that I am stuck in a vicious circle here...
> 
> My model looks like this: My dependent variable is party valence - i.e., how
> much one likes the party/leader; my instrumented variable is one's
> subjective distance to that party, which is an absolute distance between
> respondent's self-placement on the left-right scale and his/her party
> placement. The instrument is objective distance, which is an absolute
> distance between one's corrected self-placement and non-subjective party
> position in that election that are both calculated using a scaling procedure in R
> (Aldrich-Mcalvey scaling). So theoretically objective distance (instrument)
> should not be related to valence (main DV).
> 
> I ran an instrumental variable regression using ivreg2, and it gave me a p-
> value of Sargan statistic as 0.000. (see the output below)
> 
> . ivreg2 valence (subj=OBJ) if election==13
> 
> Instrumental variables (2SLS) regression
> ----------------------------------------
> 
>                                                       Number of obs =    10121
>                                                       F(  1, 10119) =  3317.93
>                                                       Prob > F      =   0.0000
> Total (centered) SS     =  11632.76136                Centered R2   =   0.3139
> Total (uncentered) SS   =  11633.38803                Uncentered R2 =   0.3139
> Residual SS             =  7981.436867                Root MSE      =      .89
> 
> ------------------------------------------------------------------------------
>      valence |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
> -------------+----------------------------------------------------------
> -------------+------
>         subj |  -.2325729   .0040372   -57.61   0.000    -.2404858   -.2246601
>        _cons |   .8629297   .0175047    49.30   0.000     .8286211    .8972384
> ------------------------------------------------------------------------------
> Sargan statistic (overidentification test of all instruments):           0.000
>                                                  (equation exactly identified)
> ------------------------------------------------------------------------------
> Instrumented:  subj
> Instruments:   OBJ
> ------------------------------------------------------------------------------
> 
> 
> 
> My understanding is that it means that my instruments are not valid (i.e.,
> they correlate with the error term of main dependent variable). My question
> is, should I try and find an instrument that is not correlated at all with main
> dependent variable? I understand that technically it should not be correlated
> with the error term in the main DV, but so far only things that are completely
> unrelated to my main DV gave me an insignificant Hansen J statistic.
> Everything that was even a little bit correlated with valence had p=0.000.
> 
> 
> Then I decided to see if there is an endogeneity problem in the first place, so
> I ran ivendog command:
> 
> . ivendog
> 
> Tests of endogeneity of: subj
> H0: Regressor is exogenous
>     Wu-Hausman F test:                 48.77272  F(1,10118)  P-value = 0.00000
>     Durbin-Wu-Hausman chi-sq test:     48.55314  Chi-sq(1)   P-value = 0.00000
> 
> 
>  However, my question is, whether I can trust its results, because
> somewhere in the Statalist archives I came across advice that DWH test
> should be done when one has good instruments. So if my instruments are
> supposedly bad, should I trust DWH test results? Is there any way to check
> endogeneity between two variables, if I do not have good instruments?
> 
> 
> Finally, here is my last question. I decided to see if individual's self-placement
> and party valence are endogenous, so I ran ivreg2 using valence as DV,
> subjective self-placement as instrumented variable and corrected self-
> placement as an instrument. The model explained VERY VERY little variance
> in valence (less than .0001). And yet, if I ran ivendog test, for some cases it
> would show that self-placement is endogenous to valence (in some cases,
> the relationship was stat. significant, but in the other cases it was not). So the
> results looked very strange. My question is, can I trust the results of DWH
> test here? I don't understand how self-placement can be endogenous to
> valence, if it explains such a tiny amount of its variance.
> 
> ivreg2 valence (self=idealpt) if election==13
> 
> Instrumental variables (2SLS) regression
> ----------------------------------------
> 
>                                                       Number of obs =    10297
>                                                       F(  1, 10295) =   279.45
>                                                       Prob > F      =   0.0000
> Total (centered) SS     =  11755.73554                Centered R2   =  -7.1385
> Total (uncentered) SS   =  11758.43573                Uncentered R2 =  -7.1367
> Residual SS             =  95674.55873                Root MSE      =        3
> 
> ------------------------------------------------------------------------------
>      valence |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
> -------------+----------------------------------------------------------
> -------------+------
>         self |  -1.037726   .0620715   -16.72   0.000    -1.159384   -.9160684
>        _cons |   5.810372   .3498078    16.61   0.000     5.124762    6.495983
> ------------------------------------------------------------------------------
> Sargan statistic (overidentification test of all instruments):           0.000
>                                                  (equation exactly identified)
> ------------------------------------------------------------------------------
> Instrumented:  self
> Instruments:   OBJ
> ------------------------------------------------------------------------------
> 
> .ivendog
> 
> Tests of endogeneity of: self
> H0: Regressor is exogenous
>     Wu-Hausman F test:                 2.87e+03  F(1,10294)  P-value = 0.00000
>     Durbin-Wu-Hausman chi-sq test:     2.24e+03  Chi-sq(1)   P-value = 0.00000
> 
> 
> 
> 
> 
> 
> ***(By the way, I did all my analyses clustered by individuals [since the data
> is shaped long, with every individual having their valence judgments/party
> placements/etc for every party], so I originally ran DWH test using these
> commands instead of ivendog, since it does not run on clustered data):
> reg subj OBJ if election==13, cluster(id) predict subj_res13 if election==13,
> res reg valence subj subj_res13 if election==13, cluster(id) The results were
> the same as ivendog on un-clustered data, so I am using its output as my
> example, so that I don't overload you with my outputs.
> 
> 
> Thank you so much for your time,
> Masha
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/


----- 
Sunday Times Scottish University of the Year 2011-2013
Top in the UK for student experience
Fourth university in the UK and top in Scotland (National Student Survey 2012)


We invite research leaders and ambitious early career researchers to 
join us in leading and driving research in key inter-disciplinary themes. 
Please see www.hw.ac.uk/researchleaders for further information and how
to apply.

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/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index