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: FW: clustering in ivreg2


From   "Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: FW: clustering in ivreg2
Date   Mon, 28 Jan 2013 12:57:58 -0000

Sterling,

> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> statalist@hsphsun2.harvard.edu] On Behalf Of HUANG Sterling
> Sent: 28 January 2013 09:53
> To: statalist@hsphsun2.harvard.edu
> Subject: st: FW: clustering in ivreg2
> 
> Dear Statalister,
> 
> I have problem with clustering option in ivreg2 and I hope to get a better
> understanding.
> 
> Here is the problem:
> I am regressing firm level performance on variable X and X*Y(interaction
> between X and Y). X is endogenous, Y is exogenous and X*Y by construction
> is endogenous. I use instrument Z and Z*Y to instrument both X and X*Y. The
> problem is that X is at firm level while Z is at country level.
> 
> When I use ivreg2 with clustering option at country level,
>                 Ivreg2 performance (X XY=Z ZY) control variables,
> cluster(country_code)
> 
> I keep getting following warning messages from STATA:
> 
> Warning: estimated covariance matrix of moment conditions not of full rank.
> standard errors and model tests should be interpreted with caution.
> Possible causes: number of clusters insufficient to calculate robust covariance
> matrix singleton dummy variable (dummy with one 1 and N-1 0s or vice
> versa) partial option may address problem.
> 
> I also tried with partial(country_code) option in the ivreg2 command, and I
> get following error message.
> Error: country_code listed in partial() but not in list of regressors.
> invalid syntax
> 
> Questions:
> 1. Does anyone know what these warning and error mean and how to fix it?

The messages are fairly self-explanatory.  I think the Baum et al. 2003 and/or 2007 papers cited in the ivreg2 help file briefly discuss the first problem.  For a Stata online source, see

help j_robustsingular

from within Stata.

Your problem with the partial option is also self-explanatory:

> Error: country_code listed in partial() but not in list of regressors.
> invalid syntax

is an error because country_code is not a REGRESSOR in

>  ivreg2 performance (X XY=Z ZY) control variables, cluster(country_code)

You need to partial out REGRESSORS, i.e.,

>  ivreg2 performance (X XY=Z ZY) control variables, cluster(selected control variables)

See also the discussion in the ivreg2 help file on the partial option:

help ivreg2##s_partial

--Mark

> 2. Can we do this manually in two stages: I estimate two first stage
> probit/logit regressions for X and X*Y using instrument Z and Z*Y  with
> clustering at country level and then use predicted value of X and X*Y in the
> second stage for performance regression? I tried, it went through, but I am
> not sure econometrically whether I can do this or not.
> 
> Best,
> 
> Sterling
> 
> 
> 
> *
> *   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