Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Too few clusters in ivreg2 - again


From   "Schaffer, Mark E" <[email protected]>
To   <[email protected]>
Subject   st: RE: Too few clusters in ivreg2 - again
Date   Wed, 8 Nov 2006 19:11:55 -0000

Ramani,

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> Ramani Gunatilaka
> Sent: 08 November 2006 18:48
> To: [email protected]
> Subject: st: Too few clusters in ivreg2 - again
> 
> Hi Mark,
> Sorry to bother you again.
> I updated my version of ivreg2.
> I am sorry if these seem basic questions, but I have not been 
> able to figure this out.
> I did use fwl and specified the model as follows:
> But I got an error.
> Can you please tell me, can the fwl option be used with 2SLS?

Yes.

> Why doesn't ivreg2 like my choice of a variable for fwl?

Because even after partialling-out the variable you chose, the var-cov
matrix is still not of full rank.  You need to ensure that the variable
or variables you choose to partial-out with -fwl- actually solve the
problem.

Cheers,
Mark

Prof. Mark Schaffer
Director, CERT
Department of Economics
School of Management & Languages
Heriot-Watt University, Edinburgh EH14 4AS
tel +44-131-451-3494 / fax +44-131-451-3296
email: [email protected]
web: http://www.sml.hw.ac.uk/ecomes


> Ramani
> 
> . /* H1 base model*/
> . ivreg2 happy (ln_pcy02=f_edyrs m_edyrs) ///
> > /*individual characteristics*/ male married malemarried 
> edyrs unempld 
> > r_health workhrs netfinassets ln_earn_diff biginc smallinc 
> decrease, 
> > first cluster(province) fwl(netfinassets)
> Error: estimated covariance matrix of moment conditions not 
> of full rank;
>        overidentification statistic not reported, and 
> 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)
> -fwl- option may address problem.  See help First-stage regressions
> -----------------------
> 
> First-stage regression of ln_pcy02:
> 
> OLS estimation
> --------------
> 
> Statistics robust to heteroskedasticity and clustering on province
> 
> Number of clusters (province) = 12                    Number 
> of obs =     1713
>                                                       F( 13,  
>   11) =    18.07
>                                                       Prob > 
> F      =   0.0000
> Total (centered) SS     =   686.693671                
> Centered R2   =   0.0718
> Total (uncentered) SS   =   686.693671                
> Uncentered R2 =   0.0718
> Residual SS             =  637.3655195                Root 
> MSE      =    .6123
> 
> --------------------------------------------------------------
> ----------------
>              |               Robust
>     ln_pcy02 |      Coef.   Std. Err.      t    P>|t|     
> [95% Conf. Interval]
> -------------+------------------------------------------------
> ----------
> -------------+------
>         male |   .2686569    .081074     3.31   0.007     
> .0902143    .4470995
>      married |   .1644669   .0850305     1.93   0.079    
> -.0226838    .3516177
>  malemarried |  -.3947205   .0902204    -4.38   0.001    
> -.5932944   -.1961466
>        edyrs |   .0378845   .0063295     5.99   0.000     
> .0239532    .0518157
>      unempld |  -.1893695    .230503    -0.82   0.429    
> -.6967032    .3179642
>     r_health |   .0332917    .063011     0.53   0.608    
> -.1053947     .171978
>      workhrs |   .0018748   .0016105     1.16   0.269    
> -.0016699    .0054196
> ln_earn_diff |   .0806468   .0170508     4.73   0.001     
> .0431182    .1181754
>       biginc |   .1439435   .0745455     1.93   0.080    
> -.0201301     .308017
>     smallinc |   .0551903   .0218531     2.53   0.028      
> .007092    .1032886
>     decrease |  -.0584598   .0720107    -0.81   0.434    
> -.2169542    .1000346
>      f_edyrs |   .0081267   .0063063     1.29   0.224    
> -.0057535    .0220068
>      m_edyrs |   .0060132   .0038395     1.57   0.146    
> -.0024375     .014464
> --------------------------------------------------------------
> ----------------
> Error: estimated covariance matrix of moment conditions not 
> of full rank;
>        overidentification statistic not reported, and 
> 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)
> -fwl- option may address problem.  See help ivreg2.
> --------------------------------------------------------------
> ----------------
> Included instruments: male married malemarried edyrs unempld 
> r_health workhrs
>                       ln_earn_diff biginc smallinc decrease 
> f_edyrs m_edyrs
> --------------------------------------------------------------
> ----------------
> Partial R-squared of excluded instruments:   0.0050
> Test of excluded instruments:
>   F(  2,    11) =     3.91
>   Prob > F      =   0.0522
> 
> 
> 
> Summary results for first-stage regressions
> -------------------------------------------
> 
>                 Shea
> Variable    | Partial R2    |    Partial R2    F(  2,    11)  
>   P-value
> ln_pcy02    |   0.0050      |      0.0050           3.91      
>    0.0522
> 
> NB: first-stage F-stat cluster-robust
> 
> Underidentification tests:
>                                                  Chi-sq(2)    
>   P-value
> Anderson canon. corr. likelihood ratio stat.        8.53      
>    0.0141
> Cragg-Donald N*minEval stat.                        8.55      
>    0.0139
> Ho: matrix of reduced form coefficients has rank=K-1 (underidentified)
> Ha: matrix has rank>=K (identified)
> 
> Weak identification statistics:
> Cragg-Donald (N-L)*minEval/L2 F-stat       4.24
> 
> NB: identification statistics not robust
> 
> Anderson-Rubin test of joint significance of endogenous 
> regressors B1 in main equation, Ho:B1=0
>   F(2,11)=       8.47      P-val=0.0059
>   Chi-sq(2)=     18.61     P-val=0.0001
> NB: Anderson-Rubin stat cluster-robust
> 
> Number of clusters     N_clust     =         12
> Number of observations N           =       1713
> Number of regressors   K           =         12
> Number of instruments  L           =         13
> Number of excluded instruments L2  =          2
> 
> 
> IV (2SLS) estimation
> --------------------
> 
> Statistics robust to heteroskedasticity and clustering on province
> 
> Number of clusters (province) = 12                    Number 
> of obs =     1713
>                                                       F( 12,  
>   11) =    10.13
>                                                       Prob > 
> F      =   0.0003
> Total (centered) SS     =  1114.478239                
> Centered R2   =  -1.0234
> Total (uncentered) SS   =  1114.478239                
> Uncentered R2 =  -1.0234
> Residual SS             =   2255.04451                Root 
> MSE      =    1.147
> 
> --------------------------------------------------------------
> ----------------
>              |               Robust
>        happy |      Coef.   Std. Err.      z    P>|z|     
> [95% Conf. Interval]
> -------------+------------------------------------------------
> ----------
> -------------+------
>     ln_pcy02 |   1.560467   .5268474     2.96   0.003     
> .5278647    2.593068
>         male |  -.5853268   .2200148    -2.66   0.008    
> -1.016548   -.1541056
>      married |  -.1503001   .2183942    -0.69   0.491     
> -.578345    .2777447
>  malemarried |   .8126114    .282537     2.88   0.004     
> .2588489    1.366374
>        edyrs |  -.0586502   .0176557    -3.32   0.001    
> -.0932547   -.0240457
>      unempld |   .2073323   .5171631     0.40   0.688    
> -.8062887    1.220953
>     r_health |   .0715126   .0787037     0.91   0.364    
> -.0827439    .2257691
>      workhrs |  -.0031905   .0028553    -1.12   0.264    
> -.0087868    .0024058
> ln_earn_diff |  -.1117204   .0533627    -2.09   0.036    
> -.2163094   -.0071314
>       biginc |   .1049701   .1860298     0.56   0.573    
> -.2596416    .4695818
>     smallinc |  -.0306185    .068844    -0.44   0.656    
> -.1655503    .1043132
>     decrease |   -.329015   .1130287    -2.91   0.004    
> -.5505472   -.1074828
> --------------------------------------------------------------
> ----------------
> Anderson canon. corr. LR statistic (identification/IV 
> relevance test):   8.525
>                                                    Chi-sq(2) 
> P-val =    0.0141
> --------------------------------------------------------------
> ----------------
> Error: estimated covariance matrix of moment conditions not 
> of full rank;
>        overidentification statistic not reported, and 
> 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)
> -fwl- option may address problem.  See help ivreg2.
> --------------------------------------------------------------
> ----------------
> Instrumented:         ln_pcy02
> Included instruments: male married malemarried edyrs unempld 
> r_health workhrs
>                       ln_earn_diff biginc smallinc decrease 
> Excluded instruments: f_edyrs m_edyrs Partialled-out (FWL): 
> netfinassets _cons
>                       nb: variable counts and small-sample adjustments
>                       do not include partialled-out variables.
> -------------------------------------------------------
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index