Announcement

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

  • Xtabond, variables choice, model validation

    sebastian Kripfganz
    Thanks for your help, really appreciate.
    You mention in your last post that
    provided that you can assume that your regressors and control variables (besides the lagged dependent variable) are strictly exogenous. If that is a good assumption or not depends on your underlying economic theory. In addition, you would need to check the usual specification tests (Arellano-Bond test, Hansen test).
    .

    1.I read about the assumption regarding the exogenous of the variables but I have to confess that I am not 100 sure about that. Any advice on that?
    2. I checked the specifications tests and obtained the following results. the AR(2) is small can I anyway conclude to the validity of my variables, model choice?

    Many Thanks

    Code:
     xtabond2 L(0/2).fh_polity2 lnQuantity lnQuantity2 lnwdi_gdpcapcur al_ethnic lnross_oil_prod lnwdi_pop tdum4-tdum27, gmmstyle(L.fh_polity2, equation(diff) lag(1 .) collapse) ivstyle(lnQuantity lnQuantity2 lnwdi_gdpcapcur lnwdi_pop lnross_oil_prod al_ethnic, equation(diff)) ivstyle(tdum4-tdum27, equation(level)) twostep robust h(2) 
    Favoring speed over space. To switch, type or click on mata: mata set matafavor space, perm.
    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: ccode                           Number of obs      =      1069
    Time variable : year                            Number of groups   =        52
    Number of instruments = 49                      Obs per group: min =         3
    Wald chi2(32) =    334.98                                      avg =     20.56
    Prob > chi2   =     0.000                                      max =        23
    ---------------------------------------------------------------------------------
                    |              Corrected
         fh_polity2 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    ----------------+----------------------------------------------------------------
         fh_polity2 |
                L1. |    .741296   .2352722     3.15   0.002      .280171    1.202421
                L2. |   -.089446   .0452714    -1.98   0.048    -.1781762   -.0007158
                    |
         lnQuantity |          0  (omitted)
        lnQuantity2 |  -.0790774   .2660865    -0.30   0.766    -.6005973    .4424425
    lnwdi_gdpcapcur |  -.1744521   .1667085    -1.05   0.295    -.5011947    .1522905
          al_ethnic |   4.508854   5.565101     0.81   0.418    -6.398543    15.41625
    lnross_oil_prod |   .0271386   .0810581     0.33   0.738    -.1317323    .1860096
          lnwdi_pop |  -.2055078   .5209358    -0.39   0.693    -1.226523    .8155077
              tdum4 |  -.1254753   .1688911    -0.74   0.458    -.4564958    .2055453
              tdum5 |   .1037048   .1576107     0.66   0.511    -.2052066    .4126161
              tdum6 |   .0731329   .1915654     0.38   0.703    -.3023284    .4485942
              tdum7 |   .1418915   .1983097     0.72   0.474    -.2467883    .5305714
              tdum8 |   .0373409   .2214471     0.17   0.866    -.3966875    .4713693
              tdum9 |    .245128   .1976073     1.24   0.215    -.1421753    .6324312
             tdum10 |    .286853   .2678615     1.07   0.284     -.238146    .8118519
             tdum11 |   .4119268   .2411296     1.71   0.088    -.0606786    .8845322
             tdum12 |   .3155458   .2554646     1.24   0.217    -.1851556    .8162472
             tdum13 |   .3088352   .2112838     1.46   0.144    -.1052734    .7229438
             tdum14 |   .3408329   .2461677     1.38   0.166    -.1416469    .8233126
             tdum15 |   .3912267   .2981041     1.31   0.189    -.1930466       .9755
             tdum16 |   .4814959   .3078377     1.56   0.118    -.1218549    1.084847
             tdum17 |   .3722092   .3573986     1.04   0.298    -.3282792    1.072698
             tdum18 |   .4505485   .3539213     1.27   0.203    -.2431245    1.144222
             tdum19 |   .5127796   .3772751     1.36   0.174    -.2266659    1.252225
             tdum20 |   .5115291   .4016883     1.27   0.203    -.2757656    1.298824
             tdum21 |   .5006258   .4090696     1.22   0.221    -.3011358    1.302387
             tdum22 |   .6272965   .4432503     1.42   0.157    -.2414582    1.496051
             tdum23 |    .566952   .4520146     1.25   0.210    -.3189804    1.452884
             tdum24 |    .563987   .4550702     1.24   0.215    -.3279342    1.455908
             tdum25 |   .5084679   .4822307     1.05   0.292    -.4366869    1.453623
             tdum26 |          0  (omitted)
             tdum27 |          0  (omitted)
              _cons |   4.685599   13.42412     0.35   0.727    -21.62519    30.99638
    ---------------------------------------------------------------------------------
    Instruments for first differences equation
      Standard
        D.(lnQuantity lnQuantity2 lnwdi_gdpcapcur lnwdi_pop lnross_oil_prod
        al_ethnic)
      GMM-type (missing=0, separate instruments for each period unless collapsed)
        L(1/26).L.fh_polity2 collapsed
    Instruments for levels equation
      Standard
        tdum4 tdum5 tdum6 tdum7 tdum8 tdum9 tdum10 tdum11 tdum12 tdum13 tdum14
        tdum15 tdum16 tdum17 tdum18 tdum19 tdum20 tdum21 tdum22 tdum23 tdum24
        tdum25 tdum26 tdum27
        _cons
    ------------------------------------------------------------------------------
    Arellano-Bond test for AR(1) in first differences: z =  -2.33  Pr > z =  0.020
    Arellano-Bond test for AR(2) in first differences: z =  -0.61  Pr > z =  0.545
    ------------------------------------------------------------------------------
    Sargan test of overid. restrictions: chi2(16)   =  13.48  Prob > chi2 =  0.638
      (Not robust, but not weakened by many instruments.)
    Hansen test of overid. restrictions: chi2(16)   =  21.38  Prob > chi2 =  0.164
      (Robust, but weakened by many instruments.)
    
    Difference-in-Hansen tests of exogeneity of instrument subsets:
      iv(lnQuantity lnQuantity2 lnwdi_gdpcapcur lnwdi_pop lnross_oil_prod al_ethnic, eq(diff))
        Hansen test excluding group:     chi2(13)   =  17.45  Prob > chi2 =  0.180
        Difference (null H = exogenous): chi2(3)    =   3.94  Prob > chi2 =  0.269

  • #2
    It is hard to give specific advice regarding the exogeneity of your variables. You would have to ask this to someone who knows the literature in your applied field.

    Based on your estimation results, the specification is not rejected by the Arellano-Bond AR(2) test and the Hansen test. Both have a p-value larger than conventional significance levels and thus do not reject the respective null hypotheses. That is good news. Also, the second lag of your dependent variable enters the model with statistical significance, confirming the choice of (at least) two lags.

    What is worrying, though, is that there are a couple of omitted variables. Could you please show me the output of the following command when you execute it immediately after xtabond2:
    Code:
    tabulate year if e(sample)
    I suspect that some (3?) of your years are excluded from the estimation because of missing values. That would explain why some dummy variables are dropped. You could also double check the results with my xtseqreg command if the teffects option selects the same number of time dummies or less.
    https://twitter.com/Kripfganz

    Comment


    • #3
      Dear Sebastian,
      Many thanks.

      1.
      It is hard to give specific advice regarding the exogeneity of your variables. You would have to ask this to someone who knows the literature in your applied field.
      In fact, there might be a feedback of my dependent variable on my independent and control variables. I read that, in such case, I should specify instruments for my regressors but I don't know how to do it.

      2.
      the second lag of your dependent variable enters the model with statistical significance, confirming the choice of (at least) two lags.
      . Do you mean then that my lag specification my be: lag(2 .) (instead of lag(1. .) as it is now?)

      3. the result of:
      Code:
      tabulate year if e(sample)
      
             Year |      Freq.     Percent        Cum.
      ------------+-----------------------------------
             2008 |         39       16.39       16.39
             2009 |         39       16.39       32.77
             2010 |         41       17.23       50.00
             2011 |         39       16.39       66.39
             2012 |         39       16.39       82.77
             2013 |         41       17.23      100.00
      ------------+-----------------------------------
            Total |        238      100.00
      4. Here the results from the xtseqreg command
      Code:
      . xtseqreg L(0/2).fh_polity2 lnQuantity lnQuantity2 lnwdi_gdpcapcur al_ethnic lnross_oil_prod lnwdi_pop tdum4-tdum27, gmmiv(L.fh_polity
      > 2, model(diff) lagrange(1 .) collapse) iv(lnQuantity lnQuantity2 lnwdi_gdpcapcur lnross_oil_prod al_ethnic lnwdi_pop, model(diff)) iv
      > (tdum4-tdum27, model(level)) twostep vce(robust) wmatrix(independent)                                                                
      >            
      
      Group variable: ccode                        Number of obs         =      1069
      Time variable: year                          Number of groups      =        52
      
                                                   Obs per group:    min =         3
                                                                     avg =  20.55769
                                                                     max =        23
      
                                                   Number of instruments =        52
      
                                           (Std. Err. adjusted for clustering on ccode)
      ---------------------------------------------------------------------------------
                      |              WC-Robust
           fh_polity2 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
      ----------------+----------------------------------------------------------------
           fh_polity2 |
                  L1. |   .7513084   .1227385     6.12   0.000     .5107454    .9918714
                  L2. |  -.0627681   .0548636    -1.14   0.253    -.1702987    .0447626
                      |
           lnQuantity |          0  (omitted)
          lnQuantity2 |  -.0448647    .255417    -0.18   0.861    -.5454728    .4557435
      lnwdi_gdpcapcur |   .2909337   .5202111     0.56   0.576    -.7286614    1.310529
            al_ethnic |   .7076623   6.993838     0.10   0.919    -13.00001    14.41533
      lnross_oil_prod |  -.3826875   .4895483    -0.78   0.434    -1.342185    .5768094
            lnwdi_pop |  -.9005157   1.140704    -0.79   0.430    -3.136255    1.335223
                tdum4 |  -.1236993   .1740843    -0.71   0.477    -.4648982    .2174996
                tdum5 |   .0595028    .134484     0.44   0.658     -.204081    .3230865
                tdum6 |  -.0193784   .2085549    -0.09   0.926    -.4281384    .3893817
                tdum7 |   .1066513   .2417014     0.44   0.659    -.3670748    .5803774
                tdum8 |  -.0030784   .2231264    -0.01   0.989     -.440398    .4342412
                tdum9 |   .2623102    .213425     1.23   0.219    -.1559951    .6806155
               tdum10 |    .319563   .3176661     1.01   0.314    -.3030512    .9421771
               tdum11 |   .4526316    .366217     1.24   0.216    -.2651405    1.170404
               tdum12 |   .3594998   .3513033     1.02   0.306     -.329042    1.048042
               tdum13 |   .5594115    .462866     1.21   0.227    -.3477892    1.466612
               tdum14 |   .5003174   .4947248     1.01   0.312    -.4693254     1.46996
               tdum15 |   .4984977   .5513147     0.90   0.366    -.5820593    1.579055
               tdum16 |   .6054379   .6545619     0.92   0.355    -.6774799    1.888356
               tdum17 |   .4813207   .7013074     0.69   0.493    -.8932164    1.855858
               tdum18 |   .3933586   .7427953     0.53   0.596    -1.062493    1.849211
               tdum19 |   .3782097   .7838292     0.48   0.629    -1.158067    1.914487
               tdum20 |   .4547675   .8085886     0.56   0.574    -1.130037    2.039572
               tdum21 |   .4362111   .8826268     0.49   0.621    -1.293706    2.166128
               tdum22 |   .5281326   .9379268     0.56   0.573     -1.31017    2.366435
               tdum23 |     .50214   .9905782     0.51   0.612    -1.439358    2.443638
               tdum24 |    .497032   1.002608     0.50   0.620    -1.468044    2.462108
               tdum25 |   .4644882   1.016356     0.46   0.648    -1.527534     2.45651
               tdum26 |          0  (omitted)
               tdum27 |          0  (omitted)
                _cons |   20.37665   27.97035     0.73   0.466    -34.44424    75.19753
      ---------------------------------------------------------------------------------
      
      . 
      . . estat overid                                                                                                                       
      >   
      
      Hansen's J-test                                        chi2(22)    =   17.0631
      H0: overidentifying restrictions are valid             Prob > chi2 =    0.7599
      
      . 
      . 
      . 
      . . estat serial, ar(1/3)
      
      Arellano-Bond test for autocorrelation of the first-differenced residuals
      H0: no autocorrelation of order 1:     z =   -3.3452   Prob > |z|  =    0.0008
      H0: no autocorrelation of order 2:     z =   -0.5780   Prob > |z|  =    0.5632
      H0: no autocorrelation of order 3:     z =    1.2425   Prob > |z|  =    0.2141
      5. the two tests give different results and also, I was expecting positive signs for the regressor (quantity) that is negative for both of the test.

      Many thanks in advance for your kind help.

      Comment


      • #4
        1. You could use lagged instruments for those variables similar to your dependent variable.
        2. No, I mean that is makes sense that you have L2.fh_polity2 as a regressor in your model.
        3. That's very weird. You told me earlier that your sample ranges from 1990 to 2016. Also, both xtabond2 and xtseqreg report a maximum obs. per group of 23. The tabulate command should thus show at least 23 years and not just the 6 years from 2008 to 2013. I do not understand that. Do you get the same output when you run this tabulate command immediately after the xtseqreg command?
        4. The xtseqreg results are not the same as the xtabond2 results because the default of the iv() option differs. While xtabond2 automatically creates first differences of the respective instruments for the first-differenced equation, xtseqreg does not unless you also specify the suboption difference, i.e.
          Code:
          iv(lnQuantity lnQuantity2 lnwdi_gdpcapcur lnross_oil_prod al_ethnic lnwdi_pop, model(diff) diff)
          Furthermore, could you please rerun the xtseqreg command without manually specifying the time dummies but with the option teffects instead:
          Code:
          xtseqreg L(0/2).fh_polity2 lnQuantity lnQuantity2 lnwdi_gdpcapcur al_ethnic lnross_oil_prod lnwdi_pop, gmmiv(L.fh_polity2, model(diff) lagrange(1 .) collapse) iv(lnQuantity lnQuantity2 lnwdi_gdpcapcur lnross_oil_prod al_ethnic lnwdi_pop, model(diff) diff) teffects twostep vce(robust) wmatrix(independent)
          This should help to identify the time dummies that are really needed.
        5. The test results clearly differ between xtabond2 and xtseqreg because the estimation results are different; see the previous comment about the instruments.
        https://twitter.com/Kripfganz

        Comment


        • #5
          1.
          That's very weird. You told me earlier that your sample ranges from 1990 to 2016. Also, both xtabond2 and xtseqreg report a maximum obs. per group of 23. The tabulate command should thus show at least 23 years and not just the 6 years from 2008 to 2013. I do not understand that. Do you get the same output when you run this tabulate command immediately after the xtseqreg command?
          Yes the sample range from 1990 to 2016 and no, I do not have the same output when I run the "tabulate year if e(sample)" command immediately after the xterqreg command

          Code:
             xtseqreg L(0/2).fh_polity2 lnQuantity lnQuantity2 lnwdi_gdpcapcur al_ethnic lnross_oil_prod lnwdi_pop tdum4-tdum27, gmmiv(L.fh_polity2, model(diff) lagrange(1 .) collapse) iv(lnQuantity lnQuantity2 lnwdi_gdpcapcur lnross_oil_prod al_ethnic lnwdi_pop, model(diff) diff) teffects twostep vce(robust) wmatrix(independent)
          
          Group variable: ccode                        Number of obs         =      1069
          Time variable: year                          Number of groups      =        52
          
                                                       Obs per group:    min =         3
                                                                         avg =  20.55769
                                                                         max =        23
          
                                                       Number of instruments =        49
          
                                               (Std. Err. adjusted for clustering on ccode)
          ---------------------------------------------------------------------------------
                          |              WC-Robust
               fh_polity2 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
          ----------------+----------------------------------------------------------------
               fh_polity2 |
                      L1. |    .741296   .2352722     3.15   0.002      .280171    1.202421
                      L2. |   -.089446   .0452714    -1.98   0.048    -.1781762   -.0007158
                          |
               lnQuantity |          0  (omitted)
              lnQuantity2 |  -.0790774   .2660865    -0.30   0.766    -.6005973    .4424425
          lnwdi_gdpcapcur |  -.1744521   .1667085    -1.05   0.295    -.5011947    .1522905
                al_ethnic |   4.508854   5.565101     0.81   0.418    -6.398543    15.41625
          lnross_oil_prod |   .0271386   .0810581     0.33   0.738    -.1317323    .1860096
                lnwdi_pop |  -.2055078   .5209358    -0.39   0.693    -1.226523    .8155077
                    tdum4 |  -.1254753   .1688911    -0.74   0.458    -.4564958    .2055453
                    tdum5 |   .1037048   .1576107     0.66   0.511    -.2052066    .4126161
                    tdum6 |          0  (omitted)
                    tdum7 |          0  (omitted)
                    tdum8 |          0  (omitted)
                    tdum9 |          0  (omitted)
                   tdum10 |          0  (omitted)
                   tdum11 |   .4119268   .2411296     1.71   0.088    -.0606786    .8845322
                   tdum12 |          0  (omitted)
                   tdum13 |   .3088352   .2112838     1.46   0.144    -.1052734    .7229438
                   tdum14 |   .3408329   .2461677     1.38   0.166    -.1416469    .8233126
                   tdum15 |   .3912267   .2981041     1.31   0.189    -.1930466       .9755
                   tdum16 |   .4814959   .3078377     1.56   0.118    -.1218549    1.084847
                   tdum17 |   .3722092   .3573986     1.04   0.298    -.3282792    1.072698
                   tdum18 |          0  (omitted)
                   tdum19 |   .5127796   .3772751     1.36   0.174    -.2266659    1.252225
                   tdum20 |          0  (omitted)
                   tdum21 |   .5006258   .4090696     1.22   0.221    -.3011358    1.302387
                   tdum22 |   .6272965   .4432503     1.42   0.157    -.2414582    1.496051
                   tdum23 |    .566952   .4520146     1.25   0.210    -.3189804    1.452884
                   tdum24 |    .563987   .4550702     1.24   0.215    -.3279342    1.455908
                   tdum25 |   .5084679   .4822307     1.05   0.292    -.4366869    1.453623
                   tdum26 |          0  (omitted)
                   tdum27 |          0  (omitted)
                          |
                     year |
                    1993  |          0  (omitted)
                    1994  |          0  (omitted)
                    1995  |   .0731329   .1915654     0.38   0.703    -.3023284    .4485942
                    1996  |   .1418915   .1983097     0.72   0.474    -.2467883    .5305714
                    1997  |   .0373409   .2214471     0.17   0.866    -.3966875    .4713693
                    1998  |    .245128   .1976073     1.24   0.215    -.1421753    .6324312
                    1999  |    .286853   .2678615     1.07   0.284     -.238146    .8118519
                    2000  |          0  (omitted)
                    2001  |   .3155458   .2554646     1.24   0.217    -.1851556    .8162472
                    2002  |          0  (omitted)
                    2003  |          0  (omitted)
                    2004  |          0  (omitted)
                    2005  |          0  (omitted)
                    2006  |          0  (omitted)
                    2007  |   .4505485   .3539213     1.27   0.203    -.2431245    1.144222
                    2008  |          0  (omitted)
                    2009  |   .5115291   .4016883     1.27   0.203    -.2757655    1.298824
                    2010  |          0  (omitted)
                    2011  |          0  (omitted)
                    2012  |          0  (omitted)
                    2013  |          0  (omitted)
                    2014  |          0  (omitted)
                          |
                    _cons |   4.685599   13.42412     0.35   0.727    -21.62519    30.99638
          ---------------------------------------------------------------------------------
          
          . estat overid                                                                                                                       
          
          Hansen's J-test                                        chi2(19)    =   21.3827
          H0: overidentifying restrictions are valid             Prob > chi2 =    0.3160
          
          . 
          . estat serial, ar(1/3)
          
          Arellano-Bond test for autocorrelation of the first-differenced residuals
          H0: no autocorrelation of order 1:     z =   -2.3320   Prob > |z|  =    0.0197
          H0: no autocorrelation of order 2:     z =   -0.6055   Prob > |z|  =    0.5448
          H0: no autocorrelation of order 3:     z =    1.1835   Prob > |z|  =    0.2366
          
          . tabulate year if e(sample)
          
                 Year |      Freq.     Percent        Cum.
          ------------+-----------------------------------
                 1992 |         42        3.93        3.93
                 1993 |         44        4.12        8.04
                 1994 |         43        4.02       12.07
                 1995 |         45        4.21       16.28
                 1996 |         46        4.30       20.58
                 1997 |         47        4.40       24.98
                 1998 |         47        4.40       29.37
                 1999 |         47        4.40       33.77
                 2000 |         47        4.40       38.17
                 2001 |         47        4.40       42.56
                 2002 |         46        4.30       46.87
                 2003 |         47        4.40       51.26
                 2004 |         47        4.40       55.66
                 2005 |         47        4.40       60.06
                 2006 |         48        4.49       64.55
                 2007 |         48        4.49       69.04
                 2008 |         47        4.40       73.43
                 2009 |         47        4.40       77.83
                 2010 |         47        4.40       82.23
                 2011 |         47        4.40       86.62
                 2012 |         49        4.58       91.21
                 2013 |         48        4.49       95.70
                 2014 |         46        4.30      100.00
          ------------+-----------------------------------
                Total |      1,069      100.00

          2. I tried out to lagged instruments for the non-exogenous variables as follow, but my AR(2) result is then < 5% and become smaller if I increase the lags.

          Code:
          xtabond2 L(0/2).fh_polity2 lnQuantity lnQuantity2 lnwdi_gdpcapcur al_ethnic lnross_oil_prod lnwdi_pop tdum4-tdum27, gmmstyle(L.fh_pol
          > ity2, L.lnwdi_gdpcapcur L.al_ethnic equation(diff) lag(1 .) collapse) ivstyle(lnQuantity lnQuantity2 lnross_oil_prod lnwdi_pop , equa
          > tion(diff)) ivstyle(tdum4-tdum27, equation(level)) twostep robust h(2)
          Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
          gmmstyle(L.fh_polity2, L.lnwdi_gdpcapcur L.al_ethnic equation(diff) lag(1 .) collapse) invalid.
          r(198);
          
          . 
          . . xtabond2 L(0/2).fh_polity2 lnQuantity lnQuantity2 lnwdi_gdpcapcur al_ethnic lnross_oil_prod lnwdi_pop tdum4-tdum27, gmmstyle(L.fh_p
          > olity2 L.lnwdi_gdpcapcur L.al_ethnic, equation(diff) lag(1 .) collapse) ivstyle(lnQuantity lnQuantity2 lnross_oil_prod lnwdi_pop , eq
          > uation(diff)) ivstyle(tdum4-tdum27, equation(level)) twostep robust h(2)
          Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
          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 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: ccode                           Number of obs      =      1069
          Time variable : year                            Number of groups   =        52
          Number of instruments = 93                      Obs per group: min =         3
          Wald chi2(32) =    730.59                                      avg =     20.56
          Prob > chi2   =     0.000                                      max =        23
          ---------------------------------------------------------------------------------
                          |              Corrected
               fh_polity2 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
          ----------------+----------------------------------------------------------------
               fh_polity2 |
                      L1. |   .6511516    .282483     2.31   0.021     .0974952    1.204808
                      L2. |  -.0695386   .0367554    -1.89   0.059    -.1415778    .0025007
                          |
               lnQuantity |          0  (omitted)
              lnQuantity2 |  -.2400393   .2867122    -0.84   0.402    -.8019848    .3219062
          lnwdi_gdpcapcur |   .1865474   .3805115     0.49   0.624    -.5592414    .9323362
                al_ethnic |  -.2739179   8.632441    -0.03   0.975    -17.19319    16.64535
          lnross_oil_prod |   .0367536   .0640229     0.57   0.566     -.088729    .1622363
                lnwdi_pop |   .4090251   1.304176     0.31   0.754    -2.147113    2.965163
                    tdum4 |  -.0607378   .1304037    -0.47   0.641    -.3163244    .1948488
                    tdum5 |   .0875442   .1353097     0.65   0.518    -.1776579    .3527464
                    tdum6 |    .067788   .1582914     0.43   0.668    -.2424575    .3780334
                    tdum7 |   .0600703    .135858     0.44   0.658    -.2062065     .326347
                    tdum8 |  -.0443853   .1878557    -0.24   0.813    -.4125757    .3238051
                    tdum9 |   .1261298   .2092332     0.60   0.547    -.2839597    .5362194
                   tdum10 |   .1646479    .229578     0.72   0.473    -.2853168    .6146125
                   tdum11 |   .2473264    .183708     1.35   0.178    -.1127348    .6073875
                   tdum12 |   .2083813   .1624491     1.28   0.200     -.110013    .5267756
                   tdum13 |   .1492227   .2017969     0.74   0.460    -.2462921    .5447374
                   tdum14 |   .1799438   .2371838     0.76   0.448    -.2849278    .6448155
                   tdum15 |   .1873821   .2498161     0.75   0.453    -.3022484    .6770126
                   tdum16 |   .1712642   .3056707     0.56   0.575    -.4278394    .7703678
                   tdum17 |   .0854983    .340212     0.25   0.802     -.581305    .7523016
                   tdum18 |   .0076133   .4060675     0.02   0.985    -.7882644    .8034909
                   tdum19 |   -.007903   .4448249    -0.02   0.986    -.8797437    .8639377
                   tdum20 |   .0502825   .4545515     0.11   0.912    -.8406221    .9411871
                   tdum21 |  -.0341587   .4809052    -0.07   0.943    -.9767155    .9083982
                   tdum22 |    .004149    .490666     0.01   0.993    -.9575388    .9658367
                   tdum23 |  -.0250689   .5146681    -0.05   0.961      -1.0338    .9836619
                   tdum24 |  -.0610161   .5200307    -0.12   0.907    -1.080257    .9582254
                   tdum25 |  -.1249025   .5336098    -0.23   0.815    -1.170758    .9209536
                   tdum26 |          0  (omitted)
                   tdum27 |          0  (omitted)
                    _cons |    -2.7873   22.12128    -0.13   0.900    -46.14422    40.56962
          ---------------------------------------------------------------------------------
          Instruments for first differences equation
            Standard
              D.(lnQuantity lnQuantity2 lnross_oil_prod lnwdi_pop)
            GMM-type (missing=0, separate instruments for each period unless collapsed)
              L(1/26).(L.fh_polity2 L.lnwdi_gdpcapcur L.al_ethnic) collapsed
          Instruments for levels equation
            Standard
              tdum4 tdum5 tdum6 tdum7 tdum8 tdum9 tdum10 tdum11 tdum12 tdum13 tdum14
              tdum15 tdum16 tdum17 tdum18 tdum19 tdum20 tdum21 tdum22 tdum23 tdum24
              tdum25 tdum26 tdum27
              _cons
          ------------------------------------------------------------------------------
          Arellano-Bond test for AR(1) in first differences: z =  -1.77  Pr > z =  0.077
          Arellano-Bond test for AR(2) in first differences: z =  -0.75  Pr > z =  0.455
          ------------------------------------------------------------------------------
          Sargan test of overid. restrictions: chi2(60)   =  67.63  Prob > chi2 =  0.233
            (Not robust, but not weakened by many instruments.)
          Hansen test of overid. restrictions: chi2(60)   =  19.28  Prob > chi2 =  1.000
            (Robust, but weakened by many instruments.)
          
          Difference-in-Hansen tests of exogeneity of instrument subsets:
            iv(lnQuantity lnQuantity2 lnross_oil_prod lnwdi_pop, eq(diff))
              Hansen test excluding group:     chi2(58)   =  19.42  Prob > chi2 =  1.000
              Difference (null H = exogenous): chi2(2)    =  -0.15  Prob > chi2 =  1.000
            iv(tdum4 tdum5 tdum6 tdum7 tdum8 tdum9 tdum10 tdum11 tdum12 tdum13 tdum14 tdum15 tdum16 tdum17 tdum18 tdum19 tdum20 tdum21 tdum22 tdu
          > m23 tdum24 tdum25 tdum26 tdum27, eq(level))
              Hansen test excluding group:     chi2(38)   =  23.18  Prob > chi2 =  0.972
              Difference (null H = exogenous): chi2(22)   =  -3.90  Prob > chi2 =  1.000
          the xtseqreg version

          Code:
                xtseqreg L(0/2).fh_polity2 lnQuantity lnQuantity2 lnwdi_gdpcapcur al_ethnic lnross_oil_prod lnwdi_pop tdum4-tdum27, gmmiv(L.fh_polity
          > 2 L.lnwdi_gdpcapcur L.al_ethnic, model(diff) lagrange(1 .) collapse) iv(lnQuantity lnQuantity2 lnross_oil_prod lnwdi_pop, model(diff)
          >  diff) teffects twostep vce(robust) wmatrix(independent) 
          
          Group variable: ccode                        Number of obs         =      1069
          Time variable: year                          Number of groups      =        52
          
                                                       Obs per group:    min =         3
                                                                         avg =  20.55769
                                                                         max =        23
          
                                                       Number of instruments =        93
          
                                               (Std. Err. adjusted for clustering on ccode)
          ---------------------------------------------------------------------------------
                          |              WC-Robust
               fh_polity2 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
          ----------------+----------------------------------------------------------------
               fh_polity2 |
                      L1. |   .6511516    .282483     2.31   0.021     .0974952    1.204808
                      L2. |  -.0695386   .0367554    -1.89   0.059    -.1415778    .0025007
                          |
               lnQuantity |          0  (omitted)
              lnQuantity2 |  -.2400393   .2867122    -0.84   0.402    -.8019848    .3219062
          lnwdi_gdpcapcur |   .1865474   .3805115     0.49   0.624    -.5592414    .9323362
                al_ethnic |  -.2739179   8.632441    -0.03   0.975    -17.19319    16.64535
          lnross_oil_prod |   .0367536   .0640229     0.57   0.566     -.088729    .1622363
                lnwdi_pop |   .4090251   1.304176     0.31   0.754    -2.147113    2.965163
                    tdum4 |  -.0607378   .1304037    -0.47   0.641    -.3163244    .1948488
                    tdum5 |   .0875442   .1353097     0.65   0.518    -.1776579    .3527464
                    tdum6 |          0  (omitted)
                    tdum7 |   .0600703    .135858     0.44   0.658    -.2062065     .326347
                    tdum8 |  -.0443853   .1878557    -0.24   0.813    -.4125757    .3238051
                    tdum9 |          0  (omitted)
                   tdum10 |   .1646479    .229578     0.72   0.473    -.2853168    .6146125
                   tdum11 |   .2473264    .183708     1.35   0.178    -.1127348    .6073875
                   tdum12 |          0  (omitted)
                   tdum13 |          0  (omitted)
                   tdum14 |   .1799438   .2371838     0.76   0.448    -.2849278    .6448155
                   tdum15 |   .1873821   .2498161     0.75   0.453    -.3022484    .6770126
                   tdum16 |   .1712642   .3056707     0.56   0.575    -.4278394    .7703678
                   tdum17 |   .0854983    .340212     0.25   0.802     -.581305    .7523016
                   tdum18 |   .0076133   .4060675     0.02   0.985    -.7882644    .8034909
                   tdum19 |   -.007903   .4448249    -0.02   0.986    -.8797437    .8639377
                   tdum20 |   .0502825   .4545515     0.11   0.912    -.8406221    .9411871
                   tdum21 |  -.0341587   .4809052    -0.07   0.943    -.9767155    .9083982
                   tdum22 |    .004149    .490666     0.01   0.993    -.9575388    .9658367
                   tdum23 |  -.0250689   .5146681    -0.05   0.961      -1.0338    .9836619
                   tdum24 |  -.0610161   .5200307    -0.12   0.907    -1.080258    .9582254
                   tdum25 |  -.1249025   .5336098    -0.23   0.815    -1.170758    .9209536
                   tdum26 |          0  (omitted)
                   tdum27 |          0  (omitted)
                          |
                     year |
                    1993  |          0  (omitted)
                    1994  |          0  (omitted)
                    1995  |    .067788   .1582914     0.43   0.668    -.2424575    .3780335
                    1996  |          0  (omitted)
                    1997  |          0  (omitted)
                    1998  |   .1261298   .2092332     0.60   0.547    -.2839598    .5362194
                    1999  |          0  (omitted)
                    2000  |          0  (omitted)
                    2001  |   .2083813   .1624491     1.28   0.200     -.110013    .5267756
                    2002  |   .1492227    .201797     0.74   0.460    -.2462921    .5447374
                    2003  |          0  (omitted)
                    2004  |          0  (omitted)
                    2005  |          0  (omitted)
                    2006  |          0  (omitted)
                    2007  |          0  (omitted)
                    2008  |          0  (omitted)
                    2009  |          0  (omitted)
                    2010  |          0  (omitted)
                    2011  |          0  (omitted)
                    2012  |          0  (omitted)
                    2013  |          0  (omitted)
                    2014  |          0  (omitted)
                          |
                    _cons |    -2.7873   22.12128    -0.13   0.900    -46.14422    40.56962
          ---------------------------------------------------------------------------------
          
          . estat overid                                                                                                                       
          
          Hansen's J-test                                        chi2(63)    =   19.2750
          H0: overidentifying restrictions are valid             Prob > chi2 =    1.0000
          
          . 
          .  estat serial, ar(1/3)
          
          Arellano-Bond test for autocorrelation of the first-differenced residuals
          H0: no autocorrelation of order 1:     z =   -1.7696   Prob > |z|  =    0.0768
          H0: no autocorrelation of order 2:     z =   -0.7471   Prob > |z|  =    0.4550
          H0: no autocorrelation of order 3:     z =    1.1995   Prob > |z|  =    0.2303

          Comment


          • #6
            1. Please do not combine the teffects option with the tdum variables:
              Code:
              xtseqreg L(0/2).fh_polity2 lnQuantity lnQuantity2 lnwdi_gdpcapcur al_ethnic lnross_oil_prod lnwdi_pop, gmmiv(L.fh_polity2, model(diff) lagrange(1 .) collapse) iv(lnQuantity lnQuantity2 lnwdi_gdpcapcur lnross_oil_prod al_ethnic lnwdi_pop, model(diff) diff) teffects twostep vce(robust) wmatrix(independent)
              The tabulate output shows that you actually do not use data for the years 2015 and 2016. Your estimation sample ends in 2014. That still does not explain why the variable lnQuantity is omitted. Is there anything special about this variable?
            2. With your additional GMM-style instruments for the endogenous variables, the number of instruments (93) becomes (too) large. I would recommend to restrict the maximum lag length, e.g. for xtseqreg:
              Code:
              gmmiv(L.fh_polity2 lnwdi_gdpcapcur al_ethnic, model(diff) lag(1 4) collapse)
              and similar for xtabond2.
            https://twitter.com/Kripfganz

            Comment


            • #7
              Dear Sebastian,
              Thanks.

              1.
              gmmiv(L.fh_polity2 lnwdi_gdpcapcur al_ethnic, model(diff) lag(1 4) collapse)
              What would be a logic way to obtain this interval?

              2.
              The tabulate output shows that you actually do not use data for the years 2015 and 2016. Your estimation sample ends in 2014. That still does not explain why the variable lnQuantity is omitted. Is there anything special about this variable?
              Quantity is energy household consumption of energy (kWh, Million of Hous.)and I did notice something particular with the time series of this data. When the variable is used as it is, it It is not omitted but when the log is taken, I obtained this omission and I donĀ“t get why.
              Code:
               xtabond2 L(0/2).fh_polity2 Quantity Quantity2 wdi_gdpcapcur al_ethnic ross_oil_prod wdi_popurb tdum4-tdum27, gmmstyle(L.fh_polity2 
              > L.wdi_gdpcapcur, equation(diff) lag(2 .) collapse) ivstyle(Quantity Quantity2 al_ethnic ross_oil_prod wdi_popurb, equation(diff)) i
              > vstyle(tdum4-tdum27, equation(level)) twostep robust h(2)
              Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
              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: ccode                           Number of obs      =      2035
              Time variable : year                            Number of groups   =        92
              Number of instruments = 69                      Obs per group: min =         3
              Wald chi2(32) =    338.17                                      avg =     22.12
              Prob > chi2   =     0.000                                      max =        23
              -------------------------------------------------------------------------------
                            |              Corrected
                 fh_polity2 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
              --------------+----------------------------------------------------------------
                 fh_polity2 |
                        L1. |   .5385843   .2824793     1.91   0.057    -.0150649    1.092233
                        L2. |   .1272336   .2254383     0.56   0.572    -.3146173    .5690846
                            |
                   Quantity |   .0004141   .0005019     0.83   0.409    -.0005696    .0013977
                  Quantity2 |  -1.23e-09   1.32e-09    -0.93   0.353    -3.81e-09    1.36e-09
              wdi_gdpcapcur |   5.75e-06   5.51e-06     1.04   0.297    -5.05e-06    .0000165
                  al_ethnic |  -3.941131   8.644647    -0.46   0.648    -20.88433    13.00206
              ross_oil_prod |  -9.17e-10   1.69e-09    -0.54   0.588    -4.23e-09    2.40e-09
                 wdi_popurb |   .0277273   .0248022     1.12   0.264    -.0208841    .0763388
                      tdum4 |  -.2227344   .0976095    -2.28   0.022    -.4140456   -.0314232
                      tdum5 |  -.0330069   .1240056    -0.27   0.790    -.2760534    .2100395
                      tdum6 |  -.0750574   .1205252    -0.62   0.533    -.3112823    .1611676
                      tdum7 |  -.0832793   .1227775    -0.68   0.498    -.3239188    .1573601
                      tdum8 |  -.1721146   .1315667    -1.31   0.191    -.4299806    .0857513
                      tdum9 |  -.0622459   .1298429    -0.48   0.632    -.3167334    .1922415
                     tdum10 |  -.0248061   .1244492    -0.20   0.842     -.268722    .2191098
                     tdum11 |   .0021351   .1258773     0.02   0.986    -.2445799    .2488501
                     tdum12 |  -.0790016    .126757    -0.62   0.533    -.3274408    .1694376
                     tdum13 |   .0095076   .1327168     0.07   0.943    -.2506126    .2696277
                     tdum14 |  -.0199106   .1341544    -0.15   0.882    -.2828484    .2430273
                     tdum15 |    -.03186   .1352466    -0.24   0.814    -.2969384    .2332184
                     tdum16 |   .0018881   .1421934     0.01   0.989    -.2768058     .280582
                     tdum17 |  -.0318762   .1436569    -0.22   0.824    -.3134385    .2496861
                     tdum18 |  -.1226688   .1591686    -0.77   0.441    -.4346335    .1892959
                     tdum19 |  -.1006423    .157964    -0.64   0.524     -.410246    .2089614
                     tdum20 |  -.0775193   .1719707    -0.45   0.652    -.4145756     .259537
                     tdum21 |  -.1178808   .1800887    -0.65   0.513    -.4708481    .2350865
                     tdum22 |  -.0473325   .1752841    -0.27   0.787     -.390883     .296218
                     tdum23 |   -.118468   .1943054    -0.61   0.542    -.4992996    .2623636
                     tdum24 |  -.0916615   .1856413    -0.49   0.621    -.4555117    .2721887
                     tdum25 |  -.1658361   .1949056    -0.85   0.395    -.5478441    .2161719
                     tdum26 |          0  (omitted)
                     tdum27 |          0  (omitted)
                      _cons |   1.547341   6.759539     0.23   0.819    -11.70111    14.79579
              -------------------------------------------------------------------------------
              Instruments for first differences equation
                Standard
                  D.(Quantity Quantity2 al_ethnic ross_oil_prod wdi_popurb)
                GMM-type (missing=0, separate instruments for each period unless collapsed)
                  L(2/26).(L.fh_polity2 L.wdi_gdpcapcur) collapsed
              Instruments for levels equation
                Standard
                  tdum4 tdum5 tdum6 tdum7 tdum8 tdum9 tdum10 tdum11 tdum12 tdum13 tdum14
                  tdum15 tdum16 tdum17 tdum18 tdum19 tdum20 tdum21 tdum22 tdum23 tdum24
                  tdum25 tdum26 tdum27
                  _cons
              ------------------------------------------------------------------------------
              Arellano-Bond test for AR(1) in first differences: z =  -1.01  Pr > z =  0.310
              Arellano-Bond test for AR(2) in first differences: z =  -0.62  Pr > z =  0.538
              ------------------------------------------------------------------------------
              Sargan test of overid. restrictions: chi2(36)   =  10.80  Prob > chi2 =  1.000
                (Not robust, but not weakened by many instruments.)
              Hansen test of overid. restrictions: chi2(36)   =  26.62  Prob > chi2 =  0.873
                (Robust, but weakened by many instruments.)
              
              Difference-in-Hansen tests of exogeneity of instrument subsets:
                iv(Quantity Quantity2 al_ethnic ross_oil_prod wdi_popurb, eq(diff))
                  Hansen test excluding group:     chi2(34)   =  25.02  Prob > chi2 =  0.869
                  Difference (null H = exogenous): chi2(2)    =   1.60  Prob > chi2 =  0.449
                iv(tdum4 tdum5 tdum6 tdum7 tdum8 tdum9 tdum10 tdum11 tdum12 tdum13 tdum14 tdum15 tdum16 tdum17 tdum18 tdum19 tdum20 tdum21 tdum22 t
              > dum23 tdum24 tdum25 tdum26 tdum27, eq(level))
                  Hansen test excluding group:     chi2(14)   =  18.52  Prob > chi2 =  0.184
                  Difference (null H = exogenous): chi2(22)   =   8.10  Prob > chi2 =  0.997

              Comment


              • #8
                1. I am not aware of any consensus about a rule of thumb regarding the lag depth. In general, higher-order lags tend to not have a strong correlation with the current values and consequently become weak instruments. If 4 lags is reasonable, I honestly do not know. Ideally, the results should not depend much on whether you choose 3, 4, 5, ... lags. Currently, 69 instruments are still too many.
                2. I cannot say much about the Quantity variable, sorry. Please remove tdum26 and tdum27 from your estimation (both from the set of variables and the set of instruments), i.e. only use tdum4-tdum25.
                https://twitter.com/Kripfganz

                Comment


                • #9
                  Dear Sebastian,

                  Thanks!

                  How could I reduce the number of the instruments?

                  Comment


                  • #10
                    Originally posted by Nadia Oue View Post
                    How could I reduce the number of the instruments?
                    Please see my advice 2 in my above comment #6 about restricting the maximum lag length. Of course, you choose a different maximum lag length than 4.

                    By the way: In your previous example, you have started with the 2nd lag to form the GMM-style instruments. There is no need to do that, and I would recommend to start with the 1st lag as in your earlier examples.
                    https://twitter.com/Kripfganz

                    Comment

                    Working...
                    X