Announcement

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

  • System GMM - Tests

    Dear Stata Users,


    I am attempting to apply GMM (xtabond2) to treat endogeneity and reverse causality. It is the first time that I use this model. In particular, I am trying to check the tests reported in the stata output, to be sure that everything is ok. I report below one of the models I have estimated.

    Code:
    xtabond2  SHROA_5w RepTrak Td_TE logTA Int_TA Bsize IndBoard Y1 Y2 Y3 Y4 Y5 Sector1 Sector2 Sector3 Sector4 Sector5 Country1-Country18 lag1GDPperCapita,
    >  robust gmm(SHROA_5w RepTrak Td_TE logTA Int_TA Bsize IndBoard, lag (2 2)) iv(Y1 Y2 Y3 Y4 Y5) iv(Sector1 Sector2 Sector3 Sector4 Sector5) iv(Country1-Cou
    > ntry18) small
    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 robust weighting matrix for Hansen test.
      Difference-in-Sargan/Hansen statistics may be negative.
    
    Dynamic panel-data estimation, one-step system GMM
    ------------------------------------------------------------------------------
    Group variable: Company1                        Number of obs      =       297
    Time variable : Year                            Number of groups   =        94
    Number of instruments = 66                      Obs per group: min =         1
    F(35, 93)     =     16.36                                      avg =      3.16
    Prob > F      =     0.000                                      max =         4
    ----------------------------------------------------------------------------------
                     |               Robust
            SHROA_5w |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -----------------+----------------------------------------------------------------
             RepTrak |   .8240757   .3643529     2.26   0.026     .1005431    1.547608
               Td_TE |  -.0000894   .0008028    -0.11   0.912    -.0016836    .0015048
               logTA |   .5791236   .7792745     0.74   0.459    -.9683611    2.126608
              Int_TA |  -.1055613   .0948168    -1.11   0.268    -.2938487     .082726
               Bsize |   .2358727   .3432642     0.69   0.494     -.445782    .9175275
            IndBoard |   .0093846   .0422991     0.22   0.825    -.0746131    .0933822
                  Y1 |          0  (omitted)
                  Y2 |    5.76741   2.607804     2.21   0.029     .5888279    10.94599
                  Y3 |   4.945185   2.295553     2.15   0.034     .3866719    9.503697
                  Y4 |     4.3477   1.866018     2.33   0.022     .6421585    8.053242
                  Y5 |          0  (omitted)
             Sector1 |    2.13721    1.75524     1.22   0.226    -1.348348    5.622769
             Sector2 |   3.345858   2.051973     1.63   0.106    -.7289549     7.42067
             Sector3 |          0  (omitted)
             Sector4 |   1.926695   2.326126     0.83   0.410    -2.692531    6.545921
             Sector5 |   .2156303   1.772491     0.12   0.903    -3.304185    3.735445
            Country1 |  -.3803363   5.413125    -0.07   0.944    -11.12973    10.36906
            Country2 |  -1.267118     6.9272    -0.18   0.855    -15.02316    12.48893
            Country3 |          0  (omitted)
            Country4 |   2.981356   7.630048     0.39   0.697    -12.17041    18.13312
            Country5 |   2.020135   5.026272     0.40   0.689    -7.961044    12.00131
            Country6 |   1.050245   7.457543     0.14   0.888    -13.75896    15.85945
            Country7 |     .58333   7.467397     0.08   0.938    -14.24544     15.4121
            Country8 |  -1.265909   7.970619    -0.16   0.874    -17.09398    14.56216
            Country9 |   7.628754   7.696808     0.99   0.324    -7.655581    22.91309
           Country10 |   3.032004   12.82337     0.24   0.814    -22.43267    28.49668
           Country11 |  -1.848758   8.706837    -0.21   0.832    -19.13881    15.44129
           Country12 |   1.560724   7.515723     0.21   0.836    -13.36401    16.48546
           Country13 |   5.490397   8.946452     0.61   0.541    -12.27548    23.25628
           Country14 |   5.398958    6.85746     0.79   0.433    -8.218599    19.01651
           Country15 |   1.134326   5.682236     0.20   0.842    -10.14947    12.41812
           Country16 |   .7027418    6.13279     0.11   0.909    -11.47576    12.88125
           Country17 |          0  (omitted)
           Country18 |   2.949616   5.574061     0.53   0.598    -8.119365     14.0186
    lag1GDPperCapita |  -.0000125   .0001506    -0.08   0.934    -.0003116    .0002865
               _cons |  -72.54409   27.64953    -2.62   0.010    -127.4506    -17.6376
    ----------------------------------------------------------------------------------
    Instruments for first differences equation
      Standard
        D.(Country1 Country2 Country3 Country4 Country5 Country6 Country7 Country8
        Country9 Country10 Country11 Country12 Country13 Country14 Country15
        Country16 Country17 Country18)
        D.(Sector1 Sector2 Sector3 Sector4 Sector5)
        D.(Y1 Y2 Y3 Y4 Y5)
      GMM-type (missing=0, separate instruments for each period unless collapsed)
        L2.(SHROA_5w RepTrak Td_TE logTA Int_TA Bsize IndBoard)
    Instruments for levels equation
      Standard
        Country1 Country2 Country3 Country4 Country5 Country6 Country7 Country8
        Country9 Country10 Country11 Country12 Country13 Country14 Country15
        Country16 Country17 Country18
        Sector1 Sector2 Sector3 Sector4 Sector5
        Y1 Y2 Y3 Y4 Y5
        _cons
      GMM-type (missing=0, separate instruments for each period unless collapsed)
        DL.(SHROA_5w RepTrak Td_TE logTA Int_TA Bsize IndBoard)
    ------------------------------------------------------------------------------
    Arellano-Bond test for AR(1) in first differences: z =  -2.07  Pr > z =  0.039
    Arellano-Bond test for AR(2) in first differences: z =  -0.32  Pr > z =  0.748
    ------------------------------------------------------------------------------
    Sargan test of overid. restrictions: chi2(30)   = 133.65  Prob > chi2 =  0.000
      (Not robust, but not weakened by many instruments.)
    Hansen test of overid. restrictions: chi2(30)   =  40.13  Prob > chi2 =  0.102
      (Robust, but weakened by many instruments.)
    
    Difference-in-Hansen tests of exogeneity of instrument subsets:
      GMM instruments for levels
        Hansen test excluding group:     chi2(9)    =  25.53  Prob > chi2 =  0.002
        Difference (null H = exogenous): chi2(21)   =  14.60  Prob > chi2 =  0.843
      iv(Y1 Y2 Y3 Y4 Y5)
        Hansen test excluding group:     chi2(27)   =  35.68  Prob > chi2 =  0.123
        Difference (null H = exogenous): chi2(3)    =   4.45  Prob > chi2 =  0.217
      iv(Sector1 Sector2 Sector3 Sector4 Sector5)
        Hansen test excluding group:     chi2(26)   =  35.05  Prob > chi2 =  0.111
        Difference (null H = exogenous): chi2(4)    =   5.08  Prob > chi2 =  0.279
      iv(Country1 Country2 Country3 Country4 Country5 Country6 Country7 Country8 Country9 Country10 Country11 Country12 Country13 Country14 Country15 Country16
    >  Country17 Country18)
        Hansen test excluding group:     chi2(14)   =  33.51  Prob > chi2 =  0.002
        Difference (null H = exogenous): chi2(16)   =   6.61  Prob > chi2 =  0.980



    In particular:

    - Significant F statistic (1) indicates that the model fitting should be ok. (ok)
    - The insignificant Hansen statistics should indicate the validity of the adopted instruments in the model. (ok)
    - The significance of Arellano–Bond test for AR(1) in first differences rejects the null of no first-order serial correlation. (ok)
    - The test for AR(2) does not reject the null that there is no second-order serial correlation. (not ok) But I have noted that the main part of the papers adopting this model have the same results on this test.
    - How should interpret the results of "Difference-in-Hansen tests of exogeneity of instrument subsets" ? Many articles do not even report it.

    - I adopted the "small" option to use the small-sample adjustment. It should improve my results that could be biased by the small number of observations. Is it correct?



    Any further observations on the validity/correctness of the applied model is really appreciated.


    Thank you in advance for your precious support.

    Nicola






  • #2
    Why do you think that not rejecting the AR(2) test is "not ok"? For the validity of the instruments, you typically do not want to have second-order serial correlation of the first-differenced error term in dynamic models.

    Your Hansen test results are not reliable. If you use xtabond2 with dummy variables and some of them are omitted, then the reported p-values of the overidentification tests are invalid because xtabond2 computes the degrees of freedoms incorrectly in this situation.

    Also see my recent comments in a related topic:
    Which test to see in Difference-in Hansen test, excluding or difference

    You can further use the forum search to find more related topics.
    https://www.kripfganz.de/stata/

    Comment


    • #3
      Thank you Sebastian, I have followed your suggestions. However, It seems I have problems with AR1. I have attempted to lag all the explanatory variables. But i still have a pvalue higher than 0.10. I report below the new estimations. What do you think?


      Code:
      . xtabond2 SHROA_5w l.RepTrak Td_TE logTA Int_TA Bsize IndBoard GDPperCapita age, robust gmm( SHROA_5w RepTrak Td_TE logTA Int_TA Bs
      > ize IndBoard GDPperCapita, lag (3 2)) iv ( age ) small
      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 robust weighting matrix for Hansen test.
        Difference-in-Sargan/Hansen statistics may be negative.
      
      Dynamic panel-data estimation, one-step system GMM
      ------------------------------------------------------------------------------
      Group variable: Company1                        Number of obs      =       300
      Time variable : Year                            Number of groups   =        94
      Number of instruments = 66                      Obs per group: min =         1
      F(8, 93)      =      2.52                                      avg =      3.19
      Prob > F      =     0.016                                      max =         4
      ------------------------------------------------------------------------------
                   |               Robust
          SHROA_5w |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
           RepTrak |
               L1. |   .4843673   .1730016     2.80   0.006     .1408204    .8279142
                   |
             Td_TE |    .000284   .0004111     0.69   0.491    -.0005323    .0011003
             logTA |   .6097309   .7272716     0.84   0.404    -.8344864    2.053948
            Int_TA |  -.1788213   .1009666    -1.77   0.080    -.3793211    .0216784
             Bsize |   .3303914   .2733851     1.21   0.230    -.2124973      .87328
          IndBoard |   .0503733   .0285529     1.76   0.081    -.0063272    .1070737
      GDPperCapita |  -.0001629   .0000961    -1.70   0.093    -.0003537    .0000278
               age |    .007569   .0090677     0.83   0.406    -.0104376    .0255756
             _cons |   -37.7984   14.04089    -2.69   0.008    -65.68083   -9.915975
      ------------------------------------------------------------------------------
      Instruments for first differences equation
        Standard
          D.age
        GMM-type (missing=0, separate instruments for each period unless collapsed)
          L(2/3).(SHROA_5w RepTrak Td_TE logTA Int_TA Bsize IndBoard GDPperCapita)
      Instruments for levels equation
        Standard
          age
          _cons
        GMM-type (missing=0, separate instruments for each period unless collapsed)
          DL.(SHROA_5w RepTrak Td_TE logTA Int_TA Bsize IndBoard GDPperCapita)
      ------------------------------------------------------------------------------
      Arellano-Bond test for AR(1) in first differences: z =  -1.61  Pr > z =  0.108
      Arellano-Bond test for AR(2) in first differences: z =  -1.04  Pr > z =  0.297
      ------------------------------------------------------------------------------
      Sargan test of overid. restrictions: chi2(57)   = 196.66  Prob > chi2 =  0.000
        (Not robust, but not weakened by many instruments.)
      Hansen test of overid. restrictions: chi2(57)   =  56.99  Prob > chi2 =  0.476
        (Robust, but weakened by many instruments.)
      
      Difference-in-Hansen tests of exogeneity of instrument subsets:
        GMM instruments for levels
          Hansen test excluding group:     chi2(33)   =  42.59  Prob > chi2 =  0.122
          Difference (null H = exogenous): chi2(24)   =  14.40  Prob > chi2 =  0.937
        iv(age)
          Hansen test excluding group:     chi2(56)   =  56.98  Prob > chi2 =  0.438
          Difference (null H = exogenous): chi2(1)    =   0.00  Prob > chi2 =  0.946

      Comment


      • #4
        The AR(1) test just marginally not rejects at the 10% level. You should not put too much emphasis on the test results if everything else looks fine.
        https://www.kripfganz.de/stata/

        Comment


        • #5
          Originally posted by Sebastian Kripfganz View Post
          The AR(1) test just marginally not rejects at the 10% level. You should not put too much emphasis on the test results if everything else looks fine.
          Sebastian Kripfganz please can you elaborate more on your statement? Do you think the AB test has somehow lower power compared to other tests? If so, why?

          Many thanks,

          Lukas
          ------
          I use Stata 17

          Comment


          • #6
            It has been some time since I wrote that comment, but I believe this comes from the reasoning that we should not consider testing as a strict binary decision problem. If you have two test statistics from two random samples, just by chance one of them might yield a p-value slightly larger than 0.1 and the other a p-value slightly smaller than 0.1, but there is a high chance that both samples are draws from the same underlying population. In either case, the likelihood that your model is "correctly specified" is of a similar magnitude.

            It is nevertheless true that the Arellano-Bond test might not have high power compared to some other tests. Especially if T is very small, as in the above example, a recently developed test by Jochmans can be more powerful. This is implemented in the postestimation command estat serialpm for my xtdpdgmm command: https://www.statalist.org/forums/for...45#post1676045
            https://www.kripfganz.de/stata/

            Comment


            • #7
              Hello everyone,

              I am trying to use xtabond2 to define a GMM model. The command and results are as below. The results for Arellano-Bond tests for both AR (1) and (2) are significant, while both Sargen and Hansen tests are insignificant. Does it mean that instruments are invalid and the model is not correctly specified? I mean I necessarily should reach to insigificant Arellano-Bond test for AR(2) and significant Sargan test?

              Code:
               xtabond2 dtd L.dtd CP_1 L.(MCAP fncl_lvrg return_on_asset RE_TA cash_ratio capital_expend) gdp_gr    inflation rf_rate index_return Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8 Y9 Y10 Y11 Y12 if  gicscode !=5, gmmstyle(CP_1  L.(MCAP fncl_lvrg return_on_asset RE_TA  cash_ratio capital_expend)   gdp_gr inflation rf_rate index_return Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8    Y9 Y10 Y11    Y12, collapse laglimits(1 1)) robust small two
              
              Y1 dropped due to collinearity
              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: firmcode                        Number of obs      =      4602
              Time variable : year                            Number of groups   =       728
              Number of instruments = 45                      Obs per group: min =         1
              F(23, 727)    =    628.64                                      avg =      6.32
              Prob > F      =     0.000                                      max =        12
              
              Corrected
              dtd       Coef.   Std. Err.      t    P>t     [95% Conf. Interval]
              
              dtd 
              L1.    .6113814   .0641396     9.53   0.000     .4854605    .7373024
              
              CP_1    .7722729   .2079524     3.71   0.000      .364014    1.180532
              
              MCAP 
              L1.    .8041614   .2923406     2.75   0.006     .2302289    1.378094
              
              fncl_lvrg 
              L1.   -.0021833    .001279    -1.71   0.088    -.0046942    .0003276
              
              return_on_asset 
              L1.    .0199251   .0152543     1.31   0.192    -.0100226    .0498727
              
              RE_TA 
              L1.    1.767157   1.020805     1.73   0.084    -.2369213    3.771236
              
              cash_ratio 
              L1.    .2493419   .2063071     1.21   0.227     -.155687    .6543708
              
              capital_expend 
              L1.      .00002   .0001054     0.19   0.849    -.0001868    .0002269
              
              gdp_gr   -.0164806   .0587295    -0.28   0.779    -.1317802    .0988191
              inflation    .0264414   .0330959     0.80   0.425    -.0385336    .0914164
              rf_rate   -.2128949   .1881392    -1.13   0.258    -.5822559    .1564661
              index_return   -.0198288    .016495    -1.20   0.230    -.0522123    .0125547
              Y2    1.354285   .6916206     1.96   0.051    -.0035267    2.712097
              Y3    6.692027   .7168333     9.34   0.000     5.284717    8.099338
              Y4    6.086134   .7779792     7.82   0.000      4.55878    7.613488
              Y5    4.498718   .7205533     6.24   0.000     3.084104    5.913332
              Y6    2.648962    .696054     3.81   0.000     1.282446    4.015478
              Y7    3.582663   .6795954     5.27   0.000     2.248459    4.916867
              Y8     8.23553    .631634    13.04   0.000     6.995486    9.475574
              Y9    .4567858   .5348842     0.85   0.393    -.5933163    1.506888
              Y10    5.530483   .6798649     8.13   0.000      4.19575    6.865216
              Y11    -1.43245   .8068667    -1.78   0.076    -3.016517    .1516172
              Y12    7.403293   .8234477     8.99   0.000     5.786674    9.019912
              _cons   -15.51721   3.419655    -4.54   0.000    -22.23078   -8.803628
              
              Instruments for first differences equation
              GMM-type (missing=0, separate instruments for each period unless collapsed)
              L.(CP_1 L.MCAP L.fncl_lvrg L.return_on_asset L.RE_TA L.cash_ratio
              L.capital_expend gdp_gr inflation rf_rate index_return Y1 Y2 Y3 Y4 Y5 Y6
              Y7 Y8 Y9 Y10 Y11 Y12) collapsed
              Instruments for levels equation
              Standard
              _cons
              GMM-type (missing=0, separate instruments for each period unless collapsed)
              D.(CP_1 L.MCAP L.fncl_lvrg L.return_on_asset L.RE_TA L.cash_ratio
              L.capital_expend gdp_gr inflation rf_rate index_return Y1 Y2 Y3 Y4 Y5 Y6
              Y7 Y8 Y9 Y10 Y11 Y12) collapsed
              
              Arellano-Bond test for AR(1) in first differences: z =  -4.44  Pr > z =  0.000
              Arellano-Bond test for AR(2) in first differences: z =   2.51  Pr > z =  0.012
              
              Sargan test of overid. restrictions: chi2(21)   =  31.47  Prob > chi2 =  0.066
              (Not robust, but not weakened by many instruments.)
              Hansen test of overid. restrictions: chi2(21)   =  31.55  Prob > chi2 =  0.065
              (Robust, but weakened by many instruments.)
              Thank you very much

              Comment

              Working...
              X