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]

st: RE: why coefficients change after ivreg2 partial out


From   "Schaffer, Mark E" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: RE: why coefficients change after ivreg2 partial out
Date   Mon, 10 Jun 2013 16:27:00 +0000

Ronghong,

Apologies to you and to the list for the long delay in replying.

The claim in the help file is correct - partialling-out with 2-step GMM should leave the un-partialled-out coefficients unchanged - but only if nothing else changes.

The problem is that -ivreg2- with the -gmm2s- option is a bit too forgiving when encountering a covariance matrix of orthogonality conditions (call it S) that is less than full rank, or alternatively, the warning issued by -ivreg2- is incomplete.

To do 2-step efficient GMM, -ivreg2- has to invert S to obtain the weighting matrix used in the second step of GMM.  If S is not full rank, then either:

(a) -ivreg2- should warn that test results and coefficient estimates should be treated with caution, or
(b) -ivreg2- should exit with an error and explain why.

What it does at the moment is almost the same thing as (a) but not quite - it warns that the test results should be treated with caution, but says nothing about the coefficient estimates.

What's probably happening in your case is that the problematic S generates 2nd-step GMM estimates where one or more coefficients are zeroed out (and similarly in the VCV).  Zeroed out is not the same thing as partialled-out, so the 2nd-step GMM results are different (=wrong).

Here is an example using the toy auto dataset:

****************************
. sysuse auto, clear
(1978 Automobile Data)

. gen singleton=(_n==1)

. qui ivreg2 price singleton foreign (mpg=weight), rob gmm2s
Warning: estimated covariance matrix of moment conditions not of full rank.
         model tests should be interpreted with caution.
Possible causes:
         singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)
partial option may address problem.

. mat list e(b)

e(b)[1,4]
          mpg  singleton    foreign      _cons
y1  -504.0671          0  2805.2759  16066.523

. mat list e(S)

symmetric e(S)[4,4]
              weight  singleton    foreign      _cons
   weight  8.375e+13
singleton  1.259e-19  4.297e-23
  foreign  4.408e+09          0  1960107.8
    _cons  2.383e+10  4.297e-23  1960107.8  7343027.8
****************************

The singleton variable causes the heteroskedastic-robust S to be less than full rank.   Note the row/col of what are effectively zeros in S.  Note also the zero coefficient on singleton in e(b).

If you first partial out the singleton variable, then the problem disappears:

. qui ivreg2 price singleton foreign (mpg=weight), rob gmm2s partial(singleton)

. mat list e(b)

e(b)[1,2]
           mpg     foreign
y1  -502.21911   2778.8407

. mat list e(S)

symmetric e(S)[2,2]
             weight     foreign
 weight   6.767e+12
foreign  -2.011e+09   1445594.7

Note that the coefficients are different from those in the first estimation.  Note also that S is now full rank.

If you now partial out foreign as well, then the claim in the help file kicks in - the coefficient on mpg remains -502.21911:

. qui ivreg2 price singleton foreign (mpg=weight), rob gmm2s partial(singleton foreign)

. mat list e(b)

symmetric e(b)[1,1]
           mpg
y1  -502.21911

HTH,
Mark


> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Ronghong Huang
> Sent: 22 May 2013 08:57
> To: [email protected]
> Subject: st: why coefficients change after ivreg2 partial out
> 
> Dear Statalisters,
> 
> I am sorry if this has been discussed before, however, I have spent lots of time
> searching and none answers my questions.
> 
> My question is rather short, why coefficients estimates change after I use the
> Partial Out function in ivreg2 with gmm2s (I am using the latest version of
> ivreg2)?
> 
> From the help file, it states that " By the Frisch-Waugh-Lovell (FWL) theorem, in
> IV, two-step GMM and LIML estimation the coefficients for the remaining
> regressors are the same as those that would be obtained if  the variables were
> not partialled out.  (NB: this does not hold for CUE or GMM iterated more than
> two steps.) ".
> 
> I am runing the following regression
> 
> ivreg2 y (x1=z1 z2 z3 z4) x2 x3... fe(industry) fe(year), cluster(firm) gmm2s
> 
> As there are many industry dummies, a warning message appears saying
> "Matrix not of full rank", from other posts, I know I can use Partial Out function
> to address this issue, therefore, I run the following regression again
> 
> ivreg2 y (x1=z1 z2 z3 z4) x2 x3... fe(industry) fe(year), cluster(firm) gmm2s
> partial(industry)
> 
> Suprisingly, the coefficients changed, which is not consistent with the help file. I
> retry with 2SLS and LIML, the coefficients actually are the  same after partial
> out.
> 
> Any suggestion of what is going on here? Am I doing the right thing?
> 
> Thank you for much in advance!
> 
> 
> Best Regards,
> 
> Ronghong Huang
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> *
> *   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/


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