Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • System GMM with -xtabond2- high Hansen and not a lot of significance

    Hi!

    I'm trying to analyze whether Government expenditures have the potential to reduce income inequality in a Dynamic Panel data of 30 countries (1995-2020).
    I first computed fixed effects estimators, but I want to add system GMM as robustness check as I want to avoid endogeneity issues.

    It's the first time I use -xtabond2- so ran multiple commands. The following one yields the "best" results for now:
    Code:
    xtabond2 top10sharePost l.top10sharePost total_GE educ_GE health_GE defence_GE social_prot_GE logGDPpc c.logGDPpc#c.logGDPpc hc Unempl TaxP TaxIn Trade CPI i.Year, gmm(l.top10sharePost total_GE educ_GE health_GE defence_GE social_prot_GE, collapse) iv(logGDPpc c.logGDPpc#c.logGDPpc hc Unempl i.Year) robust orthogonal small
    With top 10% income share post transfers as my dependent variable, different government expenditure types and a set of covariates (GDP per capita, human capital, unemployment, taxes on products, income taxes, openness to trade and inflation).
    I use the -orthogonal- option as my panel is unbalanced.

    This is the result:
    Code:
    xtabond2 top10sharePost l.top10sharePost total_GE educ_GE health_GE defence_GE social_prot_GE logGDPpc c.logGDPpc#c.logGDPp
    > c hc Unempl TaxP TaxIn Trade CPI i.Year, gmm(l.top10sharePost total_GE educ_GE health_GE defence_GE social_prot_GE, collaps
    > e) iv(logGDPpc c.logGDPpc#c.logGDPpc hc Unempl i.Year) robust orthogonal small
    Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
    1995b.Year dropped due to collinearity
    2017.Year dropped due to collinearity
    2020.Year dropped due to collinearity
    Warning: Number of instruments may be large relative to number of observations.
    Warning: Two-step estimated covariance matrix of moments is singular.
      Using a generalized inverse to calculate robust weighting matrix for Hansen test.
      Difference-in-Sargan/Hansen statistics may be negative.
    
    Dynamic panel-data estimation, one-step system GMM
    ------------------------------------------------------------------------------
    Group variable: code                            Number of obs      =       688
    Time variable : Year                            Number of groups   =        30
    Number of instruments = 177                     Obs per group: min =         5
    F(37, 29)     =    713.94                                      avg =     22.93
    Prob > F      =     0.000                                      max =        24
    ---------------------------------------------------------------------------------------
                          |               Robust
           top10sharePost |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    ----------------------+----------------------------------------------------------------
           top10sharePost |
                      L1. |   .6949555   .0602359    11.54   0.000     .5717593    .8181518
                          |
                 total_GE |  -.0011993   .0004547    -2.64   0.013    -.0021292   -.0002694
                  educ_GE |   .0031353   .0035082     0.89   0.379    -.0040397    .0103103
                health_GE |   .0005659   .0023851     0.24   0.814    -.0043122     .005444
               defence_GE |   .0045551   .0044644     1.02   0.316    -.0045756    .0136858
           social_prot_GE |   .0000675   .0011989     0.06   0.956    -.0023846    .0025195
                 logGDPpc |   .0407186   .0447143     0.91   0.370    -.0507324    .1321696
                          |
    c.logGDPpc#c.logGDPpc |  -.0020422   .0022727    -0.90   0.376    -.0066904     .002606
                          |
                       hc |  -.0120358   .0056354    -2.14   0.041    -.0235615   -.0005101
                   Unempl |   .0005721   .0004153     1.38   0.179    -.0002772    .0014214
                     TaxP |    .000132   .0015373     0.09   0.932    -.0030121    .0032762
                    TaxIn |    -.00012   .0012538    -0.10   0.924    -.0026842    .0024443
                    Trade |   8.41e-06   .0000392     0.21   0.832    -.0000718    .0000886
                      CPI |  -.0000104   .0000632    -0.16   0.870    -.0001398    .0001189
                          |
                     Year |
                    1996  |  -.0099925   .0066345    -1.51   0.143    -.0235615    .0035766
                    1997  |  -.0048797   .0061826    -0.79   0.436    -.0175245    .0077652
                    1998  |  -.0066666   .0066803    -1.00   0.327    -.0203294    .0069963
                    1999  |   -.010615   .0058941    -1.80   0.082    -.0226699    .0014398
                    2000  |  -.0048585   .0053659    -0.91   0.373     -.015833     .006116
                    2001  |  -.0097027   .0047246    -2.05   0.049    -.0193656   -.0000398
                    2002  |  -.0075007    .005241    -1.43   0.163    -.0182197    .0032183
                    2003  |  -.0089584   .0048729    -1.84   0.076    -.0189246    .0010079
                    2004  |  -.0068912   .0036733    -1.88   0.071     -.014404    .0006216
                    2005  |  -.0038052   .0045227    -0.84   0.407    -.0130552    .0054448
                    2006  |  -.0036164   .0049765    -0.73   0.473    -.0137945    .0065617
                    2007  |  -.0002656   .0052403    -0.05   0.960    -.0109832     .010452
                    2008  |  -.0087284   .0034038    -2.56   0.016    -.0156899   -.0017668
                    2009  |  -.0068449   .0042478    -1.61   0.118    -.0155325    .0018428
                    2010  |  -.0025293   .0050697    -0.50   0.622    -.0128981    .0078395
                    2011  |  -.0026926   .0037836    -0.71   0.482    -.0104309    .0050456
                    2012  |  -.0016278   .0026139    -0.62   0.538    -.0069737    .0037181
                    2013  |  -.0011289   .0048741    -0.23   0.818    -.0110975    .0088397
                    2014  |   .0023757   .0026167     0.91   0.371     -.002976    .0077275
                    2015  |   -.006012   .0043892    -1.37   0.181    -.0149889    .0029648
                    2016  |  -.0043263   .0028378    -1.52   0.138    -.0101302    .0014776
                    2018  |  -.0002148   .0030223    -0.07   0.944     -.006396    .0059665
                    2019  |  -.0009046   .0033603    -0.27   0.790    -.0077773     .005968
                          |
                    _cons |  -.0523268   .2136437    -0.24   0.808    -.4892773    .3846237
    ---------------------------------------------------------------------------------------
    Instruments for orthogonal deviations equation
      Standard
        FOD.(logGDPpc c.logGDPpc#c.logGDPpc hc Unempl 1995b.Year 1996.Year
        1997.Year 1998.Year 1999.Year 2000.Year 2001.Year 2002.Year 2003.Year
        2004.Year 2005.Year 2006.Year 2007.Year 2008.Year 2009.Year 2010.Year
        2011.Year 2012.Year 2013.Year 2014.Year 2015.Year 2016.Year 2017.Year
        2018.Year 2019.Year 2020.Year)
      GMM-type (missing=0, separate instruments for each period unless collapsed)
        L(1/25).(L.top10sharePost total_GE educ_GE health_GE defence_GE
        social_prot_GE) collapsed
    Instruments for levels equation
      Standard
        logGDPpc c.logGDPpc#c.logGDPpc hc Unempl 1995b.Year 1996.Year 1997.Year
        1998.Year 1999.Year 2000.Year 2001.Year 2002.Year 2003.Year 2004.Year
        2005.Year 2006.Year 2007.Year 2008.Year 2009.Year 2010.Year 2011.Year
        2012.Year 2013.Year 2014.Year 2015.Year 2016.Year 2017.Year 2018.Year
        2019.Year 2020.Year
        _cons
      GMM-type (missing=0, separate instruments for each period unless collapsed)
        D.(L.top10sharePost total_GE educ_GE health_GE defence_GE social_prot_GE)
        collapsed
    ------------------------------------------------------------------------------
    Arellano-Bond test for AR(1) in first differences: z =  -3.50  Pr > z =  0.000
    Arellano-Bond test for AR(2) in first differences: z =   1.36  Pr > z =  0.173
    ------------------------------------------------------------------------------
    Sargan test of overid. restrictions: chi2(139)  = 225.95  Prob > chi2 =  0.000
      (Not robust, but not weakened by many instruments.)
    Hansen test of overid. restrictions: chi2(139)  =   0.00  Prob > chi2 =  1.000
      (Robust, but weakened by many instruments.)
    1) Obviously I have too many instrument although I used the -collapse- command. Is there any other way to reduce the number of instruments?

    2) Is there also a way to improve the model as to increasing the significance of the coefficients? My fixed effect estimators yielded better results. I am also quite surprised that all government covariates (except for total government expenditures) have a positive relationship with income inequality; this in not the case in the literature nor in my FE analysis.

    Thanks a lot for your help!

  • #2
    System GMM is of course designed for wide, short panels, in which dynamic panel bias is a significant problem for standard FE estimation. But ~23 is fairly deep. There could still be some dynamic panel bias of course. But since the number of instruments rises with the depth of the panel, you still get a lot of instruments. I would use the lag() suboption of the gmm() option to limit the lag depth for instrument construction. The default is lag(1 .). You can limit the depth with, say, lag(1 2) or even lag(1 1).

    Since the System GMM estimator throws away more information in order to avoid dynamic panel bias, it is not surprising that it is less precise.

    Comment


    • #3
      David Roodman thank you very much for your clear answer. I have run the same code with both lag(1 2) and lag (1 1) but the issue subsists. Is there anything else I can change in my specification to tackle this?

      Code:
      xtabond2 top10sharePost l.top10sharePost total_GE educ_GE health_GE defence_GE social_prot_GE logGDPpc c.logGDPpc#c.logGDPpc hc Unempl TaxP TaxIn Trade CPI i.Year, gmm(l.top10sharePost total_GE educ_GE health_GE defence_GE social_prot_GE, collapse lag(1 1)) iv(logGDPpc c.logGDPpc#c.logGDPpc hc Unempl i.Year) robust orthogonal small
      Code:
      xtabond2 top10sharePost l.top10sharePost total_GE educ_GE health_GE defence_GE social_prot_GE logGDPpc c.logGDPpc#c.logGDPp
      > c hc Unempl TaxP TaxIn Trade CPI i.Year, gmm(l.top10sharePost total_GE educ_GE health_GE defence_GE social_prot_GE, collaps
      > e lag(1 1)) iv(logGDPpc c.logGDPpc#c.logGDPpc hc Unempl i.Year) robust orthogonal small
      Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
      1995b.Year dropped due to collinearity
      2017.Year dropped due to collinearity
      2020.Year dropped due to collinearity
      Warning: Number of instruments may be large relative to number of observations.
      Warning: Two-step estimated covariance matrix of moments is singular.
        Using a generalized inverse to calculate robust weighting matrix for Hansen test.
        Difference-in-Sargan/Hansen statistics may be negative.
      
      Dynamic panel-data estimation, one-step system GMM
      ------------------------------------------------------------------------------
      Group variable: code                            Number of obs      =       688
      Time variable : Year                            Number of groups   =        30
      Number of instruments = 40                      Obs per group: min =         5
      F(37, 29)     =     11.17                                      avg =     22.93
      Prob > F      =     0.000                                      max =        24
      ---------------------------------------------------------------------------------------
                            |               Robust
             top10sharePost |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      ----------------------+----------------------------------------------------------------
             top10sharePost |
                        L1. |   .5725775   .1608667     3.56   0.001     .2435681    .9015869
                            |
                   total_GE |    .000294   .0014692     0.20   0.843    -.0027109    .0032988
                    educ_GE |  -.0011433   .0095632    -0.12   0.906    -.0207022    .0184156
                  health_GE |   .0165348   .0136671     1.21   0.236    -.0114175    .0444871
                 defence_GE |  -.0114309   .0164803    -0.69   0.493    -.0451369     .022275
             social_prot_GE |   .0032741   .0038203     0.86   0.398    -.0045394    .0110875
                   logGDPpc |  -.1517652   .4893471    -0.31   0.759    -1.152592     .849062
                            |
      c.logGDPpc#c.logGDPpc |   .0080515   .0263331     0.31   0.762    -.0458057    .0619088
                            |
                         hc |  -.0289611   .0329217    -0.88   0.386    -.0962935    .0383714
                     Unempl |   .0004723   .0013224     0.36   0.724    -.0022322    .0031768
                       TaxP |    .001499   .0076623     0.20   0.846    -.0141722    .0171701
                      TaxIn |   -.008677   .0109506    -0.79   0.435    -.0310735    .0137195
                      Trade |   .0007135   .0007913     0.90   0.375     -.000905    .0023319
                        CPI |   .0001233   .0001922     0.64   0.526    -.0002697    .0005163
                            |
                       Year |
                      1996  |   .0345627   .0499762     0.69   0.495    -.0676501    .1367755
                      1997  |   .0366117   .0476355     0.77   0.448    -.0608139    .1340373
                      1998  |    .037469   .0487364     0.77   0.448    -.0622081     .137146
                      1999  |   .0295088   .0452326     0.65   0.519    -.0630022    .1220198
                      2000  |   .0337592   .0436051     0.77   0.445    -.0554232    .1229415
                      2001  |   .0259922   .0381349     0.68   0.501    -.0520023    .1039868
                      2002  |   .0253483   .0366268     0.69   0.494     -.049562    .1002586
                      2003  |   .0211914    .032777     0.65   0.523    -.0458452     .088228
                      2004  |   .0197579   .0296508     0.67   0.510    -.0408847    .0804005
                      2005  |   .0212954    .027366     0.78   0.443    -.0346745    .0772652
                      2006  |   .0221615   .0275079     0.81   0.427    -.0340986    .0784215
                      2007  |    .025624   .0269997     0.95   0.350    -.0295965    .0808445
                      2008  |    .008344   .0180126     0.46   0.647    -.0284959    .0451839
                      2009  |  -.0039615    .011599    -0.34   0.735     -.027684    .0197611
                      2010  |  -.0092857   .0114155    -0.81   0.423     -.032633    .0140617
                      2011  |  -.0123534   .0116981    -1.06   0.300    -.0362788     .011572
                      2012  |  -.0114556   .0110594    -1.04   0.309    -.0340746    .0111633
                      2013  |  -.0098977   .0110127    -0.90   0.376    -.0324212    .0126259
                      2014  |  -.0041973   .0095277    -0.44   0.663    -.0236836    .0152891
                      2015  |  -.0106236   .0086005    -1.24   0.227    -.0282137    .0069664
                      2016  |   -.007137   .0041465    -1.72   0.096    -.0156175    .0013435
                      2018  |   .0001406   .0035216     0.04   0.968    -.0070618     .007343
                      2019  |   .0009594   .0058095     0.17   0.870    -.0109223    .0128411
                            |
                      _cons |   .7620081   2.172218     0.35   0.728    -3.680676    5.204692
      ---------------------------------------------------------------------------------------
      Instruments for orthogonal deviations equation
        Standard
          FOD.(logGDPpc c.logGDPpc#c.logGDPpc hc Unempl 1995b.Year 1996.Year
          1997.Year 1998.Year 1999.Year 2000.Year 2001.Year 2002.Year 2003.Year
          2004.Year 2005.Year 2006.Year 2007.Year 2008.Year 2009.Year 2010.Year
          2011.Year 2012.Year 2013.Year 2014.Year 2015.Year 2016.Year 2017.Year
          2018.Year 2019.Year 2020.Year)
        GMM-type (missing=0, separate instruments for each period unless collapsed)
          L.(L.top10sharePost total_GE educ_GE health_GE defence_GE social_prot_GE)
          collapsed
      Instruments for levels equation
        Standard
          logGDPpc c.logGDPpc#c.logGDPpc hc Unempl 1995b.Year 1996.Year 1997.Year
          1998.Year 1999.Year 2000.Year 2001.Year 2002.Year 2003.Year 2004.Year
          2005.Year 2006.Year 2007.Year 2008.Year 2009.Year 2010.Year 2011.Year
          2012.Year 2013.Year 2014.Year 2015.Year 2016.Year 2017.Year 2018.Year
          2019.Year 2020.Year
          _cons
        GMM-type (missing=0, separate instruments for each period unless collapsed)
          D.(L.top10sharePost total_GE educ_GE health_GE defence_GE social_prot_GE)
          collapsed
      ------------------------------------------------------------------------------
      Arellano-Bond test for AR(1) in first differences: z =  -2.79  Pr > z =  0.005
      Arellano-Bond test for AR(2) in first differences: z =   0.83  Pr > z =  0.409
      ------------------------------------------------------------------------------
      Sargan test of overid. restrictions: chi2(2)    =   0.19  Prob > chi2 =  0.909
        (Not robust, but not weakened by many instruments.)
      Hansen test of overid. restrictions: chi2(2)    =   0.00  Prob > chi2 =  1.000
        (Robust, but weakened by many instruments.)

      Comment


      • #4
        As clarification: the number of instruments have indeed dropped; by "the issue subsists", I meant that the Hansen test yields a high result, which to my understanding is a bad sign (please correct me if I'm wrong)

        Comment


        • #5
          Certainly it is a bad sign in conjunction with a large instrument count. But here you only have 2 more instruments than instrumented variables, as indicated by the "chi2(2)" in the Hansen test report. I agree it still looks suspicious Conceivably there is something weird in the data or specification, such as collinearity that is not quite high to cause variables to be dropped. (When the regression is exactly identified, the Hansen test is also 0, but then it doesn't mean anything.) Or perhaps it's a real result.

          Comment


          • #6
            David Roodman thank you for the leads. Is there any way for me to test the hypotheses you have mentioned e.g. the collinearity? Are there typical data "weirdnesses" that could lead to such results?

            Here is my data for informational purposes
            Code:
            * Example generated by -dataex-. For more info, type help dataex
            clear
            input float code str125 Country double Year float(gini_std_WIID lag_gini_std_WIID) double top10sharePost float lag_top10sharePost double(total_GE educ_GE health_GE defence_GE social_prot_GE GDPpc) float hc double(Unempl TaxP TaxIn Trade CPI)
            1 "Austria"  1995 .3146     . .2654     . 55.8 5.5 6.7  .9 21.9 33790.4849857504  3.040141 4.34999990463257 11.2 11.4   68.25660110272   2.24336631500904
            1 "Austria"  1996     . .3146 .2644 .2654 55.6 5.5 6.7  .9 21.8 34537.7395746518 3.0553656 5.28000020980834 11.6 12.4 70.0836711206827   1.86097115760431
            1 "Austria"  1997     .     . .2606 .2644 52.3 5.4   7  .9 21.2 35220.8877426259  3.070666 5.15000009536743 11.9   13 74.8676902155828   1.30597857227694
            1 "Austria"  1998 .3027     . .2698 .2606 52.2 5.3 7.1  .9 20.9 36442.2882333384 3.0860434 5.51999998092651 11.8 13.1 76.9271493915785    .92246719668082
            1 "Austria"  1999     . .3027 .2622 .2698 52.1 5.4 7.3  .9 21.1 37664.9432792116  3.101498 4.69999980926514 11.9 12.7 78.2601403439716   .568993765885587
            1 "Austria"  2000     .     . .2737 .2622   51 5.2 7.1  .9 20.8 38842.8905195831  3.117029 4.69000005722046 11.5 12.5 85.3604956179232   2.34486285357277
            1 "Austria"  2001 .2896     . .2607 .2737 51.4 5.2   7  .8 20.6 39184.8085972636  3.133231 4.01000022888184 11.5 14.1 87.5366647639352   2.65000077279529
            1 "Austria"  2002     . .2896 .2749 .2607 51.1 5.2 7.3  .8 20.9 39636.4826114521  3.149517 4.84999990463257 11.6   13 86.9481679996606   1.81035787764132
            1 "Austria"  2003     .     . .2917 .2749 51.3 5.3 7.4  .8   21 39815.2219533064  3.165887 4.78000020980834 11.4 12.8 86.3873824162825   1.35555370896445
            1 "Austria"  2004  .296     . .2729 .2917 53.7 4.9 7.5  .8 20.6 40651.2266155811  3.182343 5.82999992370605 11.4 12.6 90.7923456929297   2.06120618032866
            1 "Austria"  2005 .2991  .296 .2877 .2729 51.2 4.8 7.4  .8 20.2 41281.2707559522  3.198884 5.63000011444092 11.2 12.1 94.0338056833054   2.29913785639285
            1 "Austria"  2006 .2876 .2991  .308 .2877 50.4 4.8 7.3  .7 19.9 42496.3510516831  3.215511 5.23999977111816 10.8   12 98.0883112053436   1.44154851119019
            1 "Austria"  2007 .2968 .2876 .2877  .308 49.2 4.7 7.4  .8 19.4 43937.7128905744  3.232225  4.8600001335144 10.8 12.5 100.733254061926   2.16855528800755
            1 "Austria"  2008  .306 .2968 .2889 .2877 49.9 4.8 7.5  .9 19.6  44440.055889928  3.249025 4.13000011444092 10.8 13.1 102.073682731706   3.21595033239883
            1 "Austria"  2009 .3041  .306 .2716 .2889 54.1 5.1 7.8  .7 21.2 42655.1921304813  3.265913 5.30000019073486   11 11.8 87.0622309742796   .506308827696486
            1 "Austria"  2010 .3145 .3041 .2784 .2716 52.8 5.1 7.9  .6 21.4 43334.5089644691  3.282888 4.82000017166138   11 11.9 99.0197962369563   1.81353438995065
            1 "Austria"  2011 .3038 .3145 .2722 .2784 50.9   5 7.7  .6 20.7 44451.0001918473  3.293652 4.55999994277954 10.9   12 105.102788629725   3.28657914875376
            1 "Austria"  2012 .3097 .3038  .254 .2722 51.2   5 7.7  .6 20.9  44549.881698231  3.304452 4.86999988555908 11.1 12.3 105.152177427838   2.48567562177017
            1 "Austria"  2013 .3063 .3097 .2545  .254 51.6   5 7.8  .6 21.3 44299.3781845446  3.315287 5.32999992370605   11 12.7 104.066414086373   2.00015616900603
            1 "Austria"  2014  .311 .3063   .27 .2545 52.4 4.9 7.9  .6 21.5 44245.1687398338  3.326157 5.61999988555908 10.9 12.9 103.503535251069   1.60581182954471
            1 "Austria"  2015 .3069  .311  .256   .27 51.1 4.9 8.2  .6 21.2 44195.8175947748  3.337063 5.71999979019165 10.9 13.4  102.42731538918   .896563335260302
            1 "Austria"  2016 .3078 .3069 .2718  .256 50.1 4.9 8.2  .6   21 44590.2516278164  3.348005 6.01000022888184 10.9   12 100.982078278741   .891591752655335
            1 "Austria"  2017 .3102 .3078 .2641 .2718 49.3 4.8 8.2  .6 20.6  45281.723399938  3.358983              5.5 10.9 12.2 104.938844932748   2.08126911385587
            1 "Austria"  2018 .3001 .3102 .2704 .2641 48.8 4.8 8.2  .6 20.2 46188.9665119872  3.369997 4.84999990463257 10.7 12.7  107.88167678734   1.99837981429546
            1 "Austria"  2019 .3101 .3001 .2573 .2704 48.6 4.8 8.3  .6 20.2 46669.7512148406  3.381046 4.48999977111816 10.7 12.9  107.47822730482   1.53089564152645
            1 "Austria"  2020  .304 .3101 .2795 .2573 56.7 5.1 9.1  .6 22.8 43346.4318485062         .  5.3600001335144 10.4 12.1 99.9989428466519   1.38191063351859
            2 "Belgium"  1995     .     . .2542     . 52.6 5.8   6 1.5 17.7  31329.892072751 2.8896086 9.34000015258789 10.4 15.6 116.378567821327   1.46796699090272
            2 "Belgium"  1996 .2841     . .2549 .2542 53.1 5.9 6.4 1.4 17.9 31681.9363634502   2.90622 9.47999954223633 10.9 15.5 119.212775757383   2.07702107350668
            2 "Belgium"  1997 .2689 .2841 .2586 .2549 51.6 5.8   6 1.4 17.7 32804.3605402361  2.922927 8.96000003814697 10.9   16  125.68894005618   1.62816049512961
            2 "Belgium"  1998     . .2689 .2635 .2586   51 5.9 6.1 1.3 17.3 33376.5748398965  2.939731 9.31999969482422   11 16.5 124.709122626318   .949250288350641
            2 "Belgium"  1999     .     . .2593 .2635 50.5 5.8 6.3 1.3 16.9 34479.9064484695   2.95663 8.64999961853027 11.3   16 125.169990540949   1.12084823417844
            2 "Belgium"  2000     .     . .2609 .2593 49.4 5.5 6.3 1.2 16.4 35674.7912530713  2.973627 6.59000015258789 11.2 16.2 142.230135067034   2.54451776190906
            2 "Belgium"  2001 .3315     . .2557 .2609 49.4 5.7 6.3 1.2 16.7 35943.2379602838  2.992419 6.17999982833862 10.8 16.4 139.576839834619   2.46925823086078
            2 "Belgium"  2002     . .3315 .2593 .2557 49.9 5.8 6.3 1.2 17.1 36393.2417665704 3.0113294 6.90999984741211 10.9 16.2 136.085149488081   1.64521436175359
            2 "Belgium"  2003     .     . .2514 .2593   51 5.9 6.9 1.1 17.4 36617.3803840227 3.0303595 7.67999982833862 10.9 15.7 132.715552833888   1.58896399970379
            2 "Belgium"  2004 .2834     . .2624 .2514 49.3 5.6 6.9 1.1 17.3 37761.2813189981   3.04951  7.3600001335144 11.1 15.7 136.918405348432   2.09728311239314
            2 "Belgium"  2005  .309 .2834 .2623 .2624 51.9 5.7 6.8 1.1 17.1 38426.0519083731  3.068781  8.4399995803833 11.2 15.8 144.529050669983   2.78143263670025
            2 "Belgium"  2006 .2938  .309 .2674 .2623 48.8 5.6 6.7   1 17.1 39147.7635597291  3.073569             8.25 11.2 15.6 149.567509299511   1.79120770070454
            2 "Belgium"  2007  .291 .2938 .2775 .2674 48.6 5.5 6.8   1 16.8 40290.2277563956  3.078365 7.46000003814697 11.2 15.4 152.468446875303    1.8230563002681
            2 "Belgium"  2008 .2953  .291 .2562 .2775 50.8 5.7 7.3 1.1 17.5 40151.8498740394  3.083168 6.98000001907349 11.1 15.7 161.088447790447   4.48944420508401
            2 "Belgium"  2009 .2844 .2953 .2628 .2562 54.7 6.1 7.8   1 19.2 39025.2207908291 3.0879786 7.90999984741211   11 14.6 135.406040531897 -.0531456741253762
            2 "Belgium"  2010 .2843 .2844 .2518 .2628 53.9   6 7.8   1 18.9 39777.9252767366  3.092797 8.28999996185303 11.2 14.8 149.997673074386   2.18929920422458
            2 "Belgium"  2011 .2849 .2843 .2524 .2518 55.3 6.2 7.7  .9 19.1 39929.0951439359 3.0989954  7.1399998664856 11.3 15.4 161.493723664633   3.53208210722744
            2 "Belgium"  2012 .2833 .2849 .2517 .2524 56.5 6.3 7.9  .9 19.6 39975.5736402458 3.1052065 7.53999996185303 11.3 15.7 160.746030229324   2.83966343445897
            2 "Belgium"  2013 .2793 .2833   .25 .2517 56.1 6.4   8  .9 20.1 39970.3174974794   3.11143 8.43000030517578 11.4 16.2 157.850845041743   1.11309594027537
            2 "Belgium"  2014 .2787 .2793  .252   .25 55.6 6.3   8  .9 19.8 40421.4207919096  3.117666 8.52000045776367 11.2 16.2 158.783215919076   .340002833356965
            2 "Belgium"  2015 .2793 .2787 .2566  .252 53.7 6.3 7.8  .8 19.4  41008.296719472 3.1239145 8.47999954223633 11.1 15.9 154.192546509323   .561429152790106
            2 "Belgium"  2016 .2783 .2793 .2563 .2566 53.1 6.2 7.6  .8 19.4 41318.0196388476 3.1301756 7.82999992370605 11.3 15.5  157.66502598438   1.97385264653172
            2 "Belgium"  2017 .2772 .2783 .2513 .2563   52 6.2 7.6  .8 19.3 41825.7628316432  3.136449 7.09000015258789 11.4 16.2  165.32583634966   2.12597086002609
            2 "Belgium"  2018 .2731 .2772  .247 .2513 52.2 6.2 7.6  .8 19.3  42403.533592766  3.142735 5.94999980926514 11.4 16.3  166.29065466732   2.05316499865181
            2 "Belgium"  2019 .2714 .2731 .2507  .247 51.8 6.1 7.5  .8 19.3 43065.5150654148  3.149034  5.3600001335144 11.3 15.2 163.693083101354   1.43681956996435
            2 "Belgium"  2020 .2715 .2714 .2489 .2507 59.2 6.6 8.8  .9 22.7 40424.6388411871         . 5.55000019073486   11 15.3 158.677450537132   .740791812220385
            3 "Bulgaria" 1995  .394     . .3513     . 31.7 3.6 1.9 1.3  8.5 4021.72281730795  2.822604 11.1000003814697  8.3    5 55.2626916823838   62.0548336837993
            3 "Bulgaria" 1996  .367  .394 .3298 .3513 36.8 3.3 1.8 1.1  8.9 4252.94649834109  2.838277             12.5  8.9  5.7 85.8206737376906    121.60754244925
            3 "Bulgaria" 1997  .376  .367 .3201 .3298 31.8 3.3 2.1 1.9  8.6 3674.93181669676  2.854038 13.6999998092651  9.5 12.1 86.4637364673225   1058.37355921973
            3 "Bulgaria" 1998  .355  .376 .3042 .3201 33.9 3.3 2.5 2.9  9.6 3839.71670227527  2.869886 12.1999998092651 12.3  9.9 77.0452088576146   18.6722044420641
            3 "Bulgaria" 1999  .336  .355 .2959 .3042 41.4 4.1   5 2.9   12 3537.10582207864 2.8858216 14.1000003814697 12.4 10.2 90.0749760451372   2.57304281890204
            3 "Bulgaria" 2000  .342  .336 .2917 .2959   43 4.2 3.8 3.2 12.7 3717.67704162788  2.901846 16.2199993133545 13.1  9.7 77.7457069237525   10.3162621289989
            3 "Bulgaria" 2001  .343  .342 .3071 .2917 40.6 3.6   4 2.6 12.6 3937.43486493199 2.9194586 19.9200000762939 12.6  9.7 79.0813687477668   7.36093927231849
            3 "Bulgaria" 2002   .38  .343 .3309 .3071 39.1 3.7 4.8 2.6 12.7 4260.11613781855  2.937178 18.1100006103516 11.7  8.7 75.2696110143524   5.81014365721823
            3 "Bulgaria" 2003  .361   .38 .3116 .3309 38.6 4.2 5.5 2.5 12.2 4518.87824967162  2.955005 13.7299995422363 13.5  6.2 79.0138810581269   2.34864169582755
            3 "Bulgaria" 2004  .368  .361 .3131 .3116 37.8   4 5.8 1.7   11 4849.54289640561   2.97294  12.039999961853   15  5.5 93.0638911878994    6.1471307424627
            3 "Bulgaria" 2005  .348  .368 .3182 .3131 36.7 4.1 4.9   2 10.6 5230.98370373178  2.990984 10.0799999237061 15.5    5 99.7142133335392   5.03883807111907
            3 "Bulgaria" 2006   .32  .348 .3173 .3182 33.7 3.6 3.8 1.6 10.8 5629.41986656582 3.0091374 8.94999980926514 16.1  5.4  111.04746275381   7.26159462769947
            3 "Bulgaria" 2007  .361   .32 .2975 .3173 37.7 3.6   4 1.4 10.1 6044.75941177202  3.027401 6.88000011444092 15.5  6.1 123.609646159658   8.40253419005894
            3 "Bulgaria" 2008 .3615  .361  .294 .2975 37.1   4 4.4 1.2 10.7 6459.64091191502 3.0457754  5.6100001335144 16.2  5.6 124.785885742919   12.3487195994021
            3 "Bulgaria" 2009 .3361 .3615 .3139  .294 39.3 4.1   4 1.2 12.9 6288.67740963612  3.064261 6.82000017166138 13.6  4.9 92.6926468702512   2.75320223914816
            3 "Bulgaria" 2010 .3384 .3361 .3158 .3139 36.1 3.6 4.4 1.7 12.9 6427.81006212601 3.0828595 10.2799997329712 13.2  4.5 103.411584202859   2.43899060504117
            3 "Bulgaria" 2011 .3565 .3384   .32 .3158 33.7 3.4 4.1 1.2 12.2 6605.08982045823 3.0941544 11.2600002288818 13.3  4.5 117.456289316293   4.21990346601875
            3 "Bulgaria" 2012 .3432 .3565 .3409   .32 34.3 3.3 4.4   1 12.3 6693.61236429071  3.105491 12.2700004577637 13.6  4.5 123.993561447479   2.95456829831017
            3 "Bulgaria" 2013 .3601 .3432 .3238 .3409 37.8 3.7 4.5 1.2 13.5 6693.45015260161  3.116868 12.9399995803833 14.4  4.9 129.732659126464   .890093540913032
            3 "Bulgaria" 2014 .3657 .3601 .3398 .3238 43.2 4.1 5.5 1.3 13.3 6796.68911922266  3.128288 11.4200000762939 13.9  5.1  130.28729035681  -1.41818380264842
            3 "Bulgaria" 2015 .3742 .3657 .3458 .3398 40.4 3.9 5.3 1.3   13 7074.68102325059  3.139749 9.14000034332275 14.3  5.3 126.700942430032  -.104633261008417
            3 "Bulgaria" 2016 .3857 .3742 .3827 .3458 34.8 3.4   5 1.1 12.3 7341.04761379451  3.151252 7.57000017166138 14.3  5.4 122.833824180651  -.798649886453611
            3 "Bulgaria" 2017 .4059 .3857 .3945 .3827 34.8 3.5 4.8 1.1 12.3 7599.12495683519 3.1627975 6.15999984741211 14.3  5.7 129.676597014807   2.06159619443137
            3 "Bulgaria" 2018 .4038 .4059 .3999 .3945 36.9 3.5   5 1.2   12 7859.67803704994  3.174385 5.21000003814697 13.7  5.6 128.851881427473   2.81454473824833
            3 "Bulgaria" 2019 .4128 .4038 .3759 .3999 35.5 3.8 4.6 1.2 11.4 8234.78133356177  3.186015 4.23000001907349 13.9  5.6 124.640430112714   3.10372944796774
            3 "Bulgaria" 2020 .4027 .4128 .3765 .3759 41.8   4 5.9 1.5 13.1 7920.91133027298         . 5.11999988555908 13.7  5.7 109.177527503356   1.67244096855762
            4 "Croatia"  1995     .     . .2682     .   52 6.3 7.8 2.6 13.1 7263.57088408122  2.798074 10.1719999313354 18.7    6 62.5852274429772   3.95010395010403
            4 "Croatia"  1996     .     . .2776 .2682 50.1 5.9 7.2 2.3 13.2 7803.92196833084   2.82012 9.68000030517578   18  6.7 66.8678996018582   4.29999999999994
            4 "Croatia"  1997     .     . .2806 .2776 48.8 5.7 6.9 2.3 12.7  8322.9639118574 2.8423395 9.71000003814697 17.6  6.2 74.7026819643543   4.17066155321187
            4 "Croatia"  1998 .2875     . .2762 .2806 50.8 6.2 7.2 2.2 14.4  8511.7818579482  2.864734 11.3900003433228 19.1    7 64.8438011665547   6.39668660837554
            4 "Croatia"  1999 .2771 .2875 .2911 .2762 52.7 6.4 7.4 2.3 14.9 8473.71054411562  2.887305 13.5600004196166 18.5  6.5 66.1460509798243   4.01913875598084
            4 "Croatia"  2000 .3133 .2771 .2781 .2911 49.3 5.7 6.7   2 13.4 8805.50039515219  2.910054 16.0599994659424   19  5.5 74.4420793864565     4.611315547378
            4 "Croatia"  2001  .311 .3133 .2756 .2781 49.4 5.5 6.2 1.8 14.8  9428.4107203318  2.937702 15.8199996948242 18.5  5.1  79.359168123064    3.7767024666589
            4 "Croatia"  2002     .  .311 .2631 .2756 50.3   6 6.2 1.6 17.3 9962.04486657184  2.965613 15.0500001907349 18.5  5.6 81.1502928556016   1.67178437393382
            4 "Croatia"  2003   .29     .   .26 .2631 49.6 5.7 6.1 1.4 14.8  10509.549672237  2.993789 13.9200000762939   18  5.5 81.5398527356933   1.76733780760626
            4 "Croatia"  2004 .2968   .29 .2664   .26 48.6 5.4 6.4 1.6 14.8  10942.572413249  3.022233 13.6599998474121 17.4  5.5 81.6872646189575   2.05539679050332
            4 "Croatia"  2005     . .2968  .279 .2664 46.5 5.1 6.2 1.4 13.7 11399.7753370191  3.050947 12.6000003814697 17.2  5.7 81.5354185269313   3.31717824448043
            4 "Croatia"  2006     .     . .2784  .279 46.2 4.8 5.9 1.3 14.1 11959.9232084277   3.08583 11.1300001144409 17.2  6.3 83.6689839770411    3.1898259147295
            4 "Croatia"  2007     .     . .2828 .2784 45.8 4.6 5.9 1.4 13.5 12550.2339482454 3.1211126  9.9099998474121 16.8  6.8 83.5519966629432   2.89928275583392
            4 "Croatia"  2008 .3371     . .2781 .2828 45.9 4.3 5.6 1.6 13.5 12789.6357975779 3.1567984 8.52999973297119 16.8  6.6 82.4615750510762   6.07696838798351
            4 "Croatia"  2009     . .3371 .2675 .2781 48.9 4.5 6.2 1.5   15 11870.7940008389  3.192892 9.19999980926514 15.8  6.6  70.397013461437   2.37852845904674
            4 "Croatia"  2010 .3256     . .2704 .2675 48.5 4.6 6.2 1.5   15 11748.9448312757 3.2293985 11.6199998855591 16.3  5.9 73.2802726706786   1.03055505333573
            4 "Croatia"  2011  .324 .3256 .2797 .2704 48.9 4.6 6.2 1.5 15.3 11779.5299874137  3.268047 13.6800003051758 15.9  5.7  78.435249159432   2.27272727272727
            4 "Croatia"  2012 .3231  .324 .2715 .2797 48.4 4.7 6.4 1.5   15 11546.7017379524  3.307762 15.9300003051758 16.8  5.6 79.7098027960427   3.41207349081366
            4 "Croatia"  2013  .325 .3231 .2798 .2715 48.3 4.8 6.3 1.3 14.9 11536.8601564677  3.348579            17.25 17.2  5.9 81.7127947242977    2.2165820642978
            4 "Croatia"  2014 .3202  .325 .2842 .2798 48.7 4.9 6.4 1.2 15.3   11543.87627967 3.3905365 17.2900009155273 17.1  5.6 85.9378921963142  -.215196159576215
            4 "Croatia"  2015 .3212 .3202 .2869 .2842 48.2 4.9 6.6 1.3 15.4 11933.3773788281  3.433675 16.1800003051758 17.5  5.4 91.3613632661389  -.464499004645002
            4 "Croatia"  2016 .3115 .3212 .2715 .2869 46.9 4.7 6.4 1.1 14.3 12441.5025378073 3.4780364 13.1000003814697 17.7  5.8 92.8680532083771  -1.12500000000001
            end

            Comment


            • #7
              Hello, I am having a similar problem to Melanie myself

              I want to look at the whether Foreign Aid and Foreign Direct Investment are substitutes or complements? I am trying to replicate a paper that uses System GMM estimation. The authors apply GMM estimation to the system of equation and its first difference in which country pair specific fixed effects are eliminated using the first lagged and first differenced regressors as instruments for equation (1). The second lagged regressors as instruments for the first difference equation. Then apply the two step procedure to the system GMM estimation to obtain larger efficiency.


              Apologies this is the first time I am using GMM estimation on stata the first question I have is this right code for implementing what the authors did
              Code:
              xtabond2 lnFDIOutflowsDonor L.lnFDIOutflowsDonor lnNetODA lnAnnualGDPperCapitaDonor lnAnnualGDPperCapitaRecip ExportsDonor ExportsRecipient GrossCapitalformation Distance FDIoutflowsRecipient Year_*, gmm(L.lnFDIOutflowsDonor, collapse) iv (laggedNetODA laggedFDI laggedFDIoutflowsRecipient Year_*) twostep robust small orthogonal
              Code:
               xtabond2 lnFDIOutflowsDonor L.lnFDIOutflowsDonor lnNetODA lnAnnualGDPperC
              > apitaDonor lnAnnualGDPperCapitaRecip ExportsDonor ExportsRecipient GrossC
              > apitalformation Distance FDIoutflowsRecipient Year_*, gmm(L.lnFDIOutflows
              > Donor, collapse) iv (laggedNetODA laggedFDI laggedFDIoutflowsRecipient Ye
              > ar_*) twostep robust small orthogonal
              Favoring speed over space. To switch, type or click on mata: mata set mataf
              > avor space, perm.
              Year_1 dropped due to collinearity
              Year_3 dropped due to collinearity
              Year_4 dropped due to collinearity
              Year_6 dropped due to collinearity
              Year_9 dropped due to collinearity
              Warning: Number of instruments may be large relative to number of observati
              > ons.
              Warning: Two-step estimated covariance matrix of moments is singular.
                Using a generalized inverse to calculate optimal weighting matrix for two
              > -step estimation.
                Difference-in-Sargan/Hansen statistics may be negative.
              
              Dynamic panel-data estimation, two-step system GMM
              ---------------------------------------------------------------------------
              > ---
              Group variable: Pairs                           Number of obs      =       
              > 109
              Time variable : Year                            Number of groups   =       
              >  33
              Number of instruments = 41                      Obs per group: min =       
              >   0
              F(28, 32)     =      2.06                                      avg =      3
              > .30
              Prob > F      =     0.025                                      max =       
              >  10
              ---------------------------------------------------------------------------
              > ---
                           |              Corrected
              lnFDIOutfl~r | Coefficient  std. err.      t    P>|t|     [95% conf. interv
              > al]
              -------------+-------------------------------------------------------------
              > ---
              lnFDIOutfl~r |
                       L1. |   .6962126   .3860207     1.80   0.081    -.0900859    1.482
              > 511
                           |
                  lnNetODA |   .6806529   .4594993     1.48   0.148    -.2553167    1.616
              > 622
              lnAnnualGD~r |  -1.409568    1.54106    -0.91   0.367    -4.548605    1.729
              > 469
              lnAnnualGD~p |   1.793425   1.735819     1.03   0.309    -1.742323    5.329
              > 172
              ExportsDonor |  -.0094527   .0595182    -0.16   0.875    -.1306874     .111
              > 782
              ExportsRec~t |    .042984   .0937826     0.46   0.650     -.148045     .234
              > 013
              GrossCapit~n |  -.1764942    .186259    -0.95   0.350    -.5558915     .202
              > 903
                  Distance |   .0001529   .0005236     0.29   0.772    -.0009137    .0012
              > 195
              FDIoutflow~t |   .0032968   .0090274     0.37   0.717    -.0150914     .021
              > 685
                    Year_2 |   1.305912   1.446874     0.90   0.373    -1.641274    4.253
              > 098
                    Year_5 |   -5.86441    8.18429    -0.72   0.479    -22.53526    10.80
              > 644
                    Year_7 |   .3704039   .7393592     0.50   0.620    -1.135622    1.876
              > 429
                    Year_8 |   1.725154   1.634263     1.06   0.299     -1.60373    5.054
              > 038
                   Year_10 |   .7391848   .7315188     1.01   0.320    -.7508702     2.22
              > 924
                   Year_11 |  -.1849016   .4147402    -0.45   0.659      -1.0297    .6598
              > 964
                   Year_12 |   .6082683   1.123912     0.54   0.592    -1.681066    2.897
              > 602
                   Year_13 |   .5084758   .8952446     0.57   0.574    -1.315078    2.332
              > 029
                   Year_14 |   .3572368    .920193     0.39   0.700    -1.517135    2.231
              > 609
                   Year_15 |  -.3362229   1.186125    -0.28   0.779     -2.75228    2.079
              > 834
                   Year_16 |   .4739624   1.355577     0.35   0.729    -2.287258    3.235
              > 183
                   Year_17 |  -1.596577   1.987369    -0.80   0.428    -5.644716    2.451
              > 562
                   Year_18 |   .3966014   2.635035     0.15   0.881    -4.970788    5.763
              > 991
                   Year_19 |   .5581739   2.436724     0.23   0.820     -4.40527    5.521
              > 617
                   Year_20 |  -1.740231   4.814586    -0.36   0.720    -11.54722    8.066
              > 761
                   Year_21 |  -2.869715   3.567632    -0.80   0.427    -10.13674    4.397
              > 314
                   Year_22 |   .2358162   1.527806     0.15   0.878    -2.876224    3.347
              > 856
                   Year_23 |   .3303245   1.093774     0.30   0.765     -1.89762    2.558
              > 269
                   Year_24 |  -.3294654   1.075089    -0.31   0.761     -2.51935    1.860
              > 419
                     _cons |          0  (omitted)
              ---------------------------------------------------------------------------
              > ---
              Instruments for orthogonal deviations equation
                Standard
                  FOD.(laggedNetODA laggedFDIoutflowsRecipient laggedFDIoutflowsRecipient
                  Year_1 Year_2 Year_3 Year_4 Year_5 Year_6 Year_7 Year_8 Year_9 Year_10
                  Year_11 Year_12 Year_13 Year_14 Year_15 Year_16 Year_17 Year_18 Year_19
                  Year_20 Year_21 Year_22 Year_23 Year_24)
                GMM-type (missing=0, separate instruments for each period unless collapse
              > d)
                  L(1/23).L.lnFDIOutflowsDonor collapsed
              Instruments for levels equation
                Standard
                  laggedNetODA laggedFDIoutflowsRecipient laggedFDIoutflowsRecipient Year
              > _1
                  Year_2 Year_3 Year_4 Year_5 Year_6 Year_7 Year_8 Year_9 Year_10 Year_11
                  Year_12 Year_13 Year_14 Year_15 Year_16 Year_17 Year_18 Year_19 Year_20
                  Year_21 Year_22 Year_23 Year_24
                  _cons
                GMM-type (missing=0, separate instruments for each period unless collapse
              > d)
                  D.L.lnFDIOutflowsDonor collapsed
              ---------------------------------------------------------------------------
              > ---
              Arellano-Bond test for AR(1) in first differences: z =  -1.34  Pr > z =  0.
              > 179
              Arellano-Bond test for AR(2) in first differences: z =  -1.00  Pr > z =  0.
              > 319
              ---------------------------------------------------------------------------
              > ---
              Sargan test of overid. restrictions: chi2(12)   =  18.01  Prob > chi2 =  0.
              > 116
                (Not robust, but not weakened by many instruments.)
              Hansen test of overid. restrictions: chi2(12)   =   4.40  Prob > chi2 =  0.
              > 975
                (Robust, but weakened by many instruments.)

              Second question, do you have any recommendations to reduce the instruments?

              Comment

              Working...
              X