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: non full ranked covariance matrix of moment conditions after xtivreg2


From   "Schaffer, Mark E" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: RE: non full ranked covariance matrix of moment conditions after xtivreg2
Date   Thu, 2 Jan 2014 00:34:10 +0000

Anat,

I'm glad the partialling out solved the problem.

I can also reproduce the strange reporting bug about the number of clusters in the 2nd group.  I'll look into fixing that bug shortly.  Thanks for reporting it!

Best wishes,
Mark

> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Anat (Manes) Tchetchik
> Sent: 02 January 2014 00:07
> To: [email protected]
> Subject: Re: st: RE: non full ranked covariance matrix of moment conditions
> after xtivreg2
> 
> Dear Mark,
> I placed each answer below the relevant question for ease of following:
> 
> > Can you check that you have the latest versions of ivreg2, xtivreg2 and
> ranktest installed, and also tell us which version of Stata you are using?
> 
> > which ivreg2, all
> c:\ado\plus\i\ivreg2.ado
> *! ivreg2 3.1.07  28Jul2013
> *! authors cfb & mes
> 
> > which xtivreg2, all
> c:\ado\plus\x\xtivreg2.ado
> *! xtivreg2 1.0.13 28Aug2011
> *! author mes
> 
> > which ranktest, all
> c:\ado\plus\r\ranktest.ado
> *! ranktest 1.3.02  27Feb2012
> *! author mes, based on code by fk
> 
> > version
> version 13.1
> 
> > Does xtivreg2 report that any observations are not used because of
> singletons?
> No- it stated among the possible causes:   singleton dummy variable
> (dummy with one 1 and N-1 0s or vice versa)
> 
> > What happens if you estimate using ivreg2 and explicit dummies for
> countries?
> 
> If I understand you correct, I ran:
>   xi: ivreg2 SS dem gini inflation shad_econ_min3  gdp i.year
> dcountry_code1 .........    dcountry_code34 , cluster( country_code
> year) bw(1)
> the results remain the same , the same coefficients,warnings and the:
> Number of clusters (year) =       2007  (I can send you the results)
> 
> > What happens if you estimate using xtivreg2 and partial-out the year
> dummies?
> 
> This has actually solved the problem as you can see below (yet it
> still says Number of clusters (year) =       2007):
> I ran the following:
> xi: xtivreg2  ss  demgini gini inflation shad_econ sixtfive gdp i.year, fe cluster(
> country_code year) bw(1) partial(i.year) and received:
> i.year            _Iyear_1989-2007    (naturally coded; _Iyear_1989 omitted)
> 
> FIXED EFFECTS ESTIMATION
> ------------------------
> Number of groups =        35                    Obs per group: min =         8
>                                                                avg =      12.6
>                                                                max =        16
> 
> OLS estimation
> --------------
> 
> Estimates efficient for homoskedasticity only Statistics robust to
> heteroskedasticity and clustering on country_code and year and kernel-robust
> to common correlated disturbances (Driscoll-Kraay)
>   kernel=Bartlett; bandwidth=1
>   time variable (t):  year
>   group variable (i): country_code
> 
> Number of clusters (country_code) =     35            Number of obs =      440
> Number of clusters (year) =       2007                F(  6,    34) =     4.40
>                                                       Prob > F      =   0.0022
> Total (centered) SS     =  2.545869056                Centered R2   =   0.1594
> Total (uncentered) SS   =  2.545869056                Uncentered R2 =   0.1594
> Residual SS             =  2.139947433                Root MSE      =   .07269
> 
> --------------------------------------------------------------------------------
>                |               Robust
> ss                 |      Coef.   Std. Err.      z    P>|z|     [95%
> Conf. Interval]
> ---------------+--------------------------------------------------------
> ---------------+--------
>  dem_gini    |   .0049295    .001544     3.19   0.001     .0019034    .0079556
>   gini_m     |   -.005013   .0024799    -2.02   0.043    -.0098736   -.0001524
> inflation      |  -.0000572   .0000218    -2.62   0.009       -.0001   -.0000145
> shad_eco  |  -.0132554   .0053642    -2.47   0.013    -.0237691   -.0027416
>  sixtfive      |  -.0003735   .0149491    -0.02   0.980    -.0296733    .0289262
> gdp           |  -.0085065   .0098609    -0.86   0.388    -.0278335    .0108204
> --------------------------------------------------------------------------------
> Included instruments: demgini_min2 gini inflation shad_eco
>                       sixtfive gdp
> Partialled-out:       _Iyear_1991 _Iyear_1992 _Iyear_1993 _Iyear_1994
>                       _Iyear_1995 _Iyear_1996 _Iyear_1997 _Iyear_1998
>                       _Iyear_1999 _Iyear_2000 _Iyear_2001 _Iyear_2002
>                       _Iyear_2003 _Iyear_2004 _Iyear_2005 _Iyear_2006
>                       _Iyear_2007
>                       nb: small-sample adjustments account for
>                           partialled-out variables
> ------------------------------------------------------------------------------
> 
> > --Anat
> >
> >> -----Original Message-----
> >> From: [email protected] [mailto:owner-
> >> [email protected]] On Behalf Of Anat (Manes) Tchetchik
> >> Sent: 01 January 2014 20:09
> >> To: [email protected]
> >> Subject: st: non full ranked covariance matrix of moment conditions
> >> after
> >> xtivreg2
> >>
> >> Dear all,
> >>
> >> I have an unbalanced panel of data on 35 countries over 17 years (446
> >> obs.) I have  jointly significant time effects are, as well as first order
> autocorrelation.
> >> As I want to account for two-way (unit and time ) cluster-robust
> >> covariance matrix and estimated the following model:
> >>
> >>  xi: xtivreg2 SS dem gini inflation shad_econ_min3  gdp  i.year, fe
> >> cluster( country year) bw(1)
> >>
> >> The output below raises two issues:
> >> (1) Why does it indicate that  the  "Number of clusters (year) = 2007"
> >> and not 17 as it should?
> >> (2) how should I treat the Warning: "estimated covariance matrix of
> >> moment conditions not of full rank.  model tests should be interpreted with
> caution"
> >> Note that when omitting the year dummies this warning doesn't appear
> >>
> >> Number of clusters (country) =     35            Number of obs =      440
> >> Number of clusters (year) =       2007
> >>
> >>      ss        Coef.           Std.          Err.
> >> ---------------+-------------------------------------------------
> >> dem 0.00493 0.001544 3.19
> >> gini -0.005013 0.00248 -2.02
> >> inflation -5.72E-05 2.18E-05 -2.62
> >>
> >>
> >>
> >> gdp -0.008507 0.009861 -0.86
> >> _Iyear_1991 0.138 0.038671 3.56
> >> _Iyear_1992 0.365 0.079991 4.56
> >> _Iyear_1993 0.332 0.081221 4.09
> >> _Iyear_1994 0.339 0.081055 4.18
> >> _Iyear_1995 0.338 0.084453 4.01
> >> _Iyear_1996 0.360 0.088365 4.07
> >> _Iyear_1997 0.371 0.093862 3.96
> >> _Iyear_1998 0.363 0.100767 3.6
> >> _Iyear_1999 0.400 0.106786 3.75
> >> _Iyear_2000 0.422 0.10945 3.86
> >> _Iyear_2001 0.418 0.115567 3.62
> >> _Iyear_2002 0.416 0.12068 3.45
> >> _Iyear_2003 0.415 0.124553 3.33
> >> _Iyear_2004 0.418 0.128937 3.24
> >> _Iyear_2005 0.418 0.129226 3.23
> >> _Iyear_2006 0.475 0.133707 3.55
> >> _Iyear_2007 0.519 0.14433 3.59
> >>
> >>
> >> Warning: estimated covariance matrix of moment conditions not of full
> rank.
> >>          model tests should be interpreted with caution.
> >> Possible causes:
> >>          number of clusters insufficient to calculate robust covariance matrix
> >>          covariance matrix of moment conditions not positive definite
> >>          covariance matrix uses too many lags
> >>          singleton dummy variable (dummy with one 1 and N-1 0s or
> >> vice versa) partial option may address problem.
> >>
> >> Best,
> >>
> >> Anat Tchetchik, PhD
> >> Department of Business Administration Guilford Glazer Faculty of
> >> Business and Management Ben-Gurion University of the Negev
> >> P.O.Box: 653
> >> Beer-Sheva, Israel, 84105
> >>
> >> E-mail:       [email protected]
> >> Phone         972-(0)8-6479735
> >> Fax:           972-(0)8-6472920
> >> *
> >> *   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/
> 
> 
> 
> --
> Anat Tchetchik, PhD
> Department of Business Administration
> Guilford Glazer Faculty of Business and Management Ben-Gurion University of
> the Negev
> P.O.Box: 653
> Beer-Sheva, Israel, 84105
> 
> E-mail:       [email protected]
> Phone         972-(0)8-6479735
> Fax:           972-(0)8-6472920
> *
> *   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