Announcement

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

  • #16
    Hello, I am trying to fit a gmm model with the code below;
    Code:
    xtabond2 trisk l.trisk bind fenex femex feric crcomind femric fexric cbmeet l.rsanc inrel totd flev,  gmm (trisk fbric, lag(1  1) collapse eq(diff)) gmm(trisk fbric, lag(0 0) collapse eq(level)) iv(bind fenex femex feric crcomind femric fexri c cbmeet inrel l.rsanc totd flev, equation(level)) two robust orthogonal small nodiffsargan
    I had the following result
    Code:
    avoring speed over space. To switch, type or click on mata: mata set matafavor space, 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.
    
    Dynamic panel-data estimation, two-step system GMM
    ------------------------------------------------------------------------------
    Group variable: bankid                          Number of obs      =       131
    Time variable : year                            Number of groups   =        15
    Number of instruments = 17                      Obs per group: min =         7
    F(13, 14)     =     18.94                                      avg =      8.73
    Prob > F      =     0.000                                      max =         9
    ------------------------------------------------------------------------------
                 |              Corrected
           trisk |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
           trisk |
             L1. |  -.8749704   .2366954    -3.70   0.002    -1.382632   -.3673092
                 |
            bind |    .460755   .3258479     1.41   0.179    -.2381191    1.159629
           fenex |   1.574508   .4650913     3.39   0.004     .5769862     2.57203
           femex |  -2.648738   .6300641    -4.20   0.001    -4.000091   -1.297385
           feric |  -.5341961    .297384    -1.80   0.094    -1.172021    .1036292
        crcomind |  -.5480378   .1801754    -3.04   0.009    -.9344756   -.1616001
          femric |   .8974255   .2398005     3.74   0.002     .3831045    1.411746
          fexric |   -.667802   .3699242    -1.81   0.093     -1.46121    .1256065
          cbmeet |   .0411593   .0421682     0.98   0.346    -.0492824     .131601
                 |
           rsanc |
             L1. |   .4546769    1.04491     0.44   0.670    -1.786433    2.695787
                 |
           inrel |   .0082195   .5229716     0.02   0.988    -1.113443    1.129882
            totd |    .807954   .1304721     6.19   0.000     .5281191    1.087789
            flev |   .4677679   .1245706     3.76   0.002     .2005905    .7349452
           _cons |  -.2411651   .1706182    -1.41   0.179    -.6071047    .1247745
    ------------------------------------------------------------------------------
    Instruments for orthogonal deviations equation
      GMM-type (missing=0, separate instruments for each period unless collapsed)
        L.(trisk fbric) collapsed
    Instruments for levels equation
      Standard
        bind fenex femex feric crcomind femric fexric cbmeet inrel L.rsanc totd
        flev
        _cons
      GMM-type (missing=0, separate instruments for each period unless collapsed)
        D.(trisk fbric) collapsed
    ------------------------------------------------------------------------------
    Arellano-Bond test for AR(1) in first differences: z =  -1.69  Pr > z =  0.090
    Arellano-Bond test for AR(2) in first differences: z =   0.01  Pr > z =  0.989
    ------------------------------------------------------------------------------
    Sargan test of overid. restrictions: chi2(3)    =  16.41  Prob > chi2 =  0.001
      (Not robust, but not weakened by many instruments.)
    Hansen test of overid. restrictions: chi2(3)    =   0.81  Prob > chi2 =  0.846
      (Robust, but weakened by many instruments.)
    After incorporating year dummies (using only the year of crisis as the whole year dummies produced results with a lot of omission) with the below code
    Code:
    xtabond2 trisk l.trisk bind fenex femex feric crcomind femric fexric cbmeet l.rsanc inrel totd flev year2009,  gmm (trisk fbric, lag(1  1) collapse eq(diff)) gmm(trisk fbric, lag(0 0) collapse eq(level)) iv(bind fenex femex feric crcomind femric fexric cbmeet inrel l.rsanc totd flev year2009, equation(level)) two robust orthogonal small nodiffsargan
    And got the following results.
    Code:
    Favoring speed over space. To switch, type or click on mata: mata set matafavor space, 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.
    
    Dynamic panel-data estimation, two-step system GMM
    ------------------------------------------------------------------------------
    Group variable: bankid                          Number of obs      =       131
    Time variable : year                            Number of groups   =        15
    Number of instruments = 17                      Obs per group: min =         7
    F(14, 14)     =     17.44                                      avg =      8.73
    Prob > F      =     0.000                                      max =         9
    ------------------------------------------------------------------------------
                 |              Corrected
           trisk |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
           trisk |
             L1. |  -.8749704   .2377135    -3.68   0.002    -1.384815   -.3651257
                 |
            bind |    .460755   .3272494     1.41   0.181     -.241125    1.162635
           fenex |   1.574508   .4670917     3.37   0.005     .5726958     2.57632
           femex |  -2.648738    .632774    -4.19   0.001    -4.005903   -1.291573
           feric |  -.5341961   .2986631    -1.79   0.095    -1.174765    .1063726
        crcomind |  -.5480378   .1809503    -3.03   0.009    -.9361377    -.159938
          femric |   .8974255   .2408319     3.73   0.002     .3808924    1.413959
          fexric |   -.667802   .3715153    -1.80   0.094    -1.464623     .129019
          cbmeet |   .0411593   .0423495     0.97   0.348    -.0496714      .13199
                 |
           rsanc |
             L1. |   .4546769   1.049405     0.43   0.671    -1.796072    2.705426
                 |
           inrel |   .0082195    .525221     0.02   0.988    -1.118267    1.134707
            totd |    .807954   .1310333     6.17   0.000     .5269155    1.088992
            flev |   .4677679   .1251064     3.74   0.002     .1994414    .7360944
        year2009 |          0  (omitted)
           _cons |  -.2411651    .171352    -1.41   0.181    -.6086787    .1263485
    ------------------------------------------------------------------------------
    Instruments for orthogonal deviations equation
      GMM-type (missing=0, separate instruments for each period unless collapsed)
        L.(trisk fbric) collapsed
    Instruments for levels equation
      Standard
        bind fenex femex feric crcomind femric fexric cbmeet inrel L.rsanc totd
        flev year2009
        _cons
      GMM-type (missing=0, separate instruments for each period unless collapsed)
        D.(trisk fbric) collapsed
    ------------------------------------------------------------------------------
    Arellano-Bond test for AR(1) in first differences: z =  -1.69  Pr > z =  0.090
    Arellano-Bond test for AR(2) in first differences: z =   0.01  Pr > z =  0.989
    ------------------------------------------------------------------------------
    Sargan test of overid. restrictions: chi2(2)    =  16.41  Prob > chi2 =  0.000
      (Not robust, but not weakened by many instruments.)
    Hansen test of overid. restrictions: chi2(2)    =   0.81  Prob > chi2 =  0.666
      (Robust, but weakened by many instruments.)
    
    
    .
    My concern however, is the number of instruments as literature suggests that number of instruments should be lower than number of groups. Can I use any of the above results? If not can you suggest what to do please.

    Comment


    • #17
      A few remarks:

      1. These estimators are designed for a large number of groups. 15 is definitely too small to expect reliable results. With that few observations, you need to resort to a much less sophisticated estimation strategy (maybe just a static fixed-effects estimation).
      2. The coefficient of your lagged dependent variable is significantly negative. This hardly makes sense in any context and indicates that the applied method is not working properly for your data set.
      3. xtabond2 suffers from several bugs that can invalidate your coefficient estimates or overidentification tests if you use forward-orthogonal deviations or have omitted coefficients in the estimation output. See my 2019 London Stata Conference presentation slides for details.
      https://www.kripfganz.de/stata/

      Comment


      • #18
        Dear Sebastian,
        Thanks for your prompt response as well as your valuable suggestions. I really appreciate. As a follow-up, I have the following questions.
        1. What is the minimum number of groups suitable for the estimation of GMM?
        2. Considering the ability of GMM to address issues relating to endogeneity, what are the alternative estimation methods that can be used that will equally address endogeneity?
        3. If a static fixed effects estimation is adopted as suggested how can endogeneity be addressed?

        Thanks

        Comment


        • #19
          1. There is no fixed threshold and I do not want to state a number that is then quoted by others out of context. The more groups, the merrier.
          2. You could just use a simple 2SLS estimator. You could possibly still use the GMM estimator with few overidentifying restrictions but probably should restrict yourself to the one-step estimator then to avoid estimating the weighting matrix.
          3. You could do a fixed-effects IV estimation, see xtivreg.
          https://www.kripfganz.de/stata/

          Comment


          • #20
            Thanks once again for your response. One more question, please. How do I use the GMM estimator with few overidentifying restrictions? Some examples with Stata codes will be appreciated.

            Comment


            • #21
              Your initial code would already be such an example. You were estimating 14 parameters with 17 instruments. This yields just 3 overidentifying restrictions. Just remove the twostep option. My remarks 2 and 3 in post #2 above still apply.
              https://www.kripfganz.de/stata/

              Comment


              • #22
                After removing two as advised I have this code
                Code:
                 xtabond2 trisk l.trisk bind fenex femex feric crcomind femric fexric cbmeet l.rsanc inrel totd flev,  gmm (trisk fbric, lag(1  1) collapse eq(diff)) gmm(trisk fbric, lag(0 0) collapse eq(level)) iv(bind fenex femex feric crcomind femric fexri cbmeet inrel l.rsanc totd flev, equation(level)) robust orthogonal small nodiffsargan
                with the below result
                Code:
                Favoring speed over space. To switch, type or click on mata: mata set matafavor space, per
                > m.
                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.
                
                Dynamic panel-data estimation, one-step system GMM
                ------------------------------------------------------------------------------
                Group variable: bankid                          Number of obs      =       131
                Time variable : year                            Number of groups   =        15
                Number of instruments = 17                      Obs per group: min =         7
                F(13, 14)     =    148.09                                      avg =      8.73
                Prob > F      =     0.000                                      max =         9
                ------------------------------------------------------------------------------
                             |               Robust
                       trisk |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                -------------+----------------------------------------------------------------
                       trisk |
                         L1. |   -.677591   .2109977    -3.21   0.006    -1.130136   -.2250458
                             |
                        bind |   .3086724   .2687741     1.15   0.270    -.2677907    .8851355
                       fenex |   .2909774   .2071313     1.40   0.182    -.1532751    .7352298
                       femex |   .4839643   .2103207     2.30   0.037     .0328713    .9350572
                       feric |  -.2123313   .1866258    -1.14   0.274    -.6126039    .1879413
                    crcomind |  -.0826788   .1277812    -0.65   0.528    -.3567422    .1913847
                      femric |  -.2140739   .2293999    -0.93   0.367    -.7060878      .27794
                      fexric |  -.1755199   .3046504    -0.58   0.574      -.82893    .4778902
                      cbmeet |  -.0228536   .0514009    -0.44   0.663    -.1330975    .0873904
                             |
                       rsanc |
                         L1. |   .1616112   .0558429     2.89   0.012     .0418401    .2813823
                             |
                       inrel |   .6103739    .499814     1.22   0.242    -.4616206    1.682368
                        totd |   .6444273   .1382672     4.66   0.000     .3478736     .940981
                        flev |   .5292525   .1035761     5.11   0.000     .3071038    .7514011
                       _cons |  -.0469939   .1797152    -0.26   0.798    -.4324447    .3384568
                ------------------------------------------------------------------------------
                Instruments for orthogonal deviations equation
                  GMM-type (missing=0, separate instruments for each period unless collapsed)
                    L.(trisk fbric) collapsed
                Instruments for levels equation
                  Standard
                    bind fenex femex feric crcomind femric fexric cbmeet inrel L.rsanc totd
                    flev
                    _cons
                  GMM-type (missing=0, separate instruments for each period unless collapsed)
                    D.(trisk fbric) collapsed
                ------------------------------------------------------------------------------
                Arellano-Bond test for AR(1) in first differences: z =  -1.56  Pr > z =  0.120
                Arellano-Bond test for AR(2) in first differences: z =  -2.49  Pr > z =  0.013
                ------------------------------------------------------------------------------
                Sargan test of overid. restrictions: chi2(3)    =  16.41  Prob > chi2 =  0.001
                  (Not robust, but not weakened by many instruments.)
                Hansen test of overid. restrictions: chi2(3)    =   0.81  Prob > chi2 =  0.846
                  (Robust, but weakened by many instruments.)
                Then with dummy as
                Code:
                . xtabond2 trisk l.trisk bind fenex femex feric crcomind femric fexric cbmeet l.rsanc inrel totd flev year2009,  gmm (trisk fbric, lag(1  1) collapse eq(diff)) gmm(trisk fbric, lag(0 0) collapse eq(level)) iv(bind fenex femex feric crcomind femric fexric cbmeet inrel l.rsanc totd flev year2009, equation(level)) robust orthogonal small nodiffsargan
                with the following result
                Code:
                avoring speed over space. To switch, type or click on mata: mata set matafavor space, per
                > m.
                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.
                
                Dynamic panel-data estimation, one-step system GMM
                ------------------------------------------------------------------------------
                Group variable: bankid                          Number of obs      =       131
                Time variable : year                            Number of groups   =        15
                Number of instruments = 17                      Obs per group: min =         7
                F(14, 14)     =    136.33                                      avg =      8.73
                Prob > F      =     0.000                                      max =         9
                ------------------------------------------------------------------------------
                             |               Robust
                       trisk |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                -------------+----------------------------------------------------------------
                       trisk |
                         L1. |   -.677591   .2119053    -3.20   0.006    -1.132083   -.2230994
                             |
                        bind |   .3086724   .2699301     1.14   0.272    -.2702701    .8876149
                       fenex |   .2909774   .2080222     1.40   0.184    -.1551859    .7371406
                       femex |   .4839643   .2112253     2.29   0.038     .0309311    .9369974
                       feric |  -.2123313   .1874285    -1.13   0.276    -.6143256    .1896629
                    crcomind |  -.0826788   .1283308    -0.64   0.530     -.357921    .1925634
                      femric |  -.2140739   .2303866    -0.93   0.369     -.708204    .2800562
                      fexric |  -.1755199   .3059607    -0.57   0.575    -.8317403    .4807006
                      cbmeet |  -.0228536   .0516219    -0.44   0.665    -.1335716    .0878645
                             |
                       rsanc |
                         L1. |   .1616112   .0560831     2.88   0.012     .0413249    .2818975
                             |
                       inrel |   .6103739   .5019638     1.22   0.244    -.4662313    1.686979
                        totd |   .6444273   .1388619     4.64   0.000     .3465981    .9422565
                        flev |   .5292525   .1040216     5.09   0.000     .3061483    .7523566
                    year2009 |          0  (omitted)
                       _cons |  -.0469939   .1804882    -0.26   0.798    -.4341025    .3401147
                ------------------------------------------------------------------------------
                Instruments for orthogonal deviations equation
                  GMM-type (missing=0, separate instruments for each period unless collapsed)
                    L.(trisk fbric) collapsed
                Instruments for levels equation
                  Standard
                    bind fenex femex feric crcomind femric fexric cbmeet inrel L.rsanc totd
                    flev year2009
                    _cons
                  GMM-type (missing=0, separate instruments for each period unless collapsed)
                    D.(trisk fbric) collapsed
                ------------------------------------------------------------------------------
                Arellano-Bond test for AR(1) in first differences: z =  -1.56  Pr > z =  0.120
                Arellano-Bond test for AR(2) in first differences: z =  -2.49  Pr > z =  0.013
                ------------------------------------------------------------------------------
                Sargan test of overid. restrictions: chi2(2)    =  16.41  Prob > chi2 =  0.000
                  (Not robust, but not weakened by many instruments.)
                Hansen test of overid. restrictions: chi2(2)    =   0.81  Prob > chi2 =  0.666
                  (Robust, but weakened by many instruments.)
                In both models, the AR(2) is significant, the lagged dependent variable has a negative coefficient while most of my main variables of interest are not significant. Should I then conclude that GMM cannot be used with my dataset?

                Comment


                • #23
                  It is hard to say why the coefficient of the lagged dependent variable is negative. It might be a consequence of the bug in xtabond2 that produces incorrect estimates when forward-orthogonal deviations are combined with standard instruments. I suggest to use my xtdpdgmm command instead to avoid this bug.
                  https://www.kripfganz.de/stata/

                  Comment


                  • #24
                    Can you kindly assist to recommend how best to code my codes above using xtdpdgmm?
                    Code:
                     
                     xtabond2 trisk l.trisk bind fenex femex feric crcomind femric fexric cbmeet l.rsanc inrel totd flev,  gmm (trisk fbric, lag(1  1) collapse eq(diff)) gmm(trisk fbric, lag(0 0) collapse eq(level)) iv(bind fenex femex feric crcomind femric fexri cbmeet inrel l.rsanc totd flev, equation(level)) robust orthogonal small nodiffsargan
                    and

                    Code:
                     
                     xtabond2 trisk l.trisk bind fenex femex feric crcomind femric fexric cbmeet l.rsanc inrel totd flev year2009,  gmm (trisk fbric, lag(1  1) collapse eq(diff)) gmm(trisk fbric, lag(0 0) collapse eq(level)) iv(bind fenex femex feric crcomind femric fexric cbmeet inrel l.rsanc totd flev year2009, equation(level)) robust orthogonal small nodiffsargan

                    Comment


                    • #25
                      The first code can be translated as follows:
                      Code:
                      xtdpdgmm trisk l.trisk bind fenex femex feric crcomind femric fexric cbmeet l.rsanc inrel totd flev, gmm(trisk fbric, lag(0 0) collapse model(fodev)) gmm(trisk fbric, lag(0 0) collapse difference model(level)) iv(bind fenex femex feric crcomind femric fexri cbmeet inrel l.rsanc totd flev, model(level)) vce(robust) small
                      and similarly for the second code. Note that you are implicitly assuming that all the variables specified in the iv() option are exogenous, both with respect to the idiosyncratic error term and with respect to the unobserved unit-specific effects. That is a strong assumption.
                      https://www.kripfganz.de/stata/

                      Comment


                      • #26
                        Thanks for helping out. I have tried the above code with the two-step option
                        Code:
                        xtdpdgmm trisk l.trisk bind fenex femex feric crcomind femric fexric cbmeet l.r
                        > sanc inrel totd flev, gmm(trisk fbric, lag(0 0) collapse model(fodev)) gmm(tris
                        > k fbric, lag(0 0) collapse difference model(level)) iv(bind fenex femex feric c
                        > rcomind femric fexri cbmeet inrel l.rsanc totd flev, model(level)) twostep vce(
                        > robust) small overid
                        Below is the result I obtained
                        Code:
                        Generalized method of moments estimation
                        
                        Fitting full model:
                        Step 1         f(b) =  .01674888
                        Step 2         f(b) =   .0543286
                        
                        Fitting reduced model 1:
                        Step 1         f(b) =  2.377e-20
                        
                        Fitting reduced model 2:
                        Step 1         f(b) =  2.480e-19
                        
                        Group variable: bankid                       Number of obs         =       131
                        Time variable: year                          Number of groups      =        15
                        
                        Moment conditions:     linear =      17      Obs per group:    min =         7
                                            nonlinear =       0                        avg =  8.733333
                                                total =      17                        max =         9
                        
                                                        (Std. Err. adjusted for 15 clusters in bankid)
                        ------------------------------------------------------------------------------
                                     |              WC-Robust
                               trisk |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                        -------------+----------------------------------------------------------------
                               trisk |
                                 L1. |  -.8750195   .2364837    -3.70   0.002    -1.382227   -.3678123
                                     |
                                bind |   .4608648    .326181     1.41   0.180    -.2387238    1.160453
                               fenex |   1.574367   .4644094     3.39   0.004     .5783082    2.570426
                               femex |  -2.648058   .6272473    -4.22   0.001    -3.993369   -1.302746
                               feric |  -.5341719   .2971813    -1.80   0.094    -1.171562    .1032186
                            crcomind |  -.5480325   .1801222    -3.04   0.009    -.9343561   -.1617089
                              femric |   .8972322   .2388865     3.76   0.002     .3848717    1.409593
                              fexric |  -.6677633   .3696147    -1.81   0.092    -1.460508    .1249815
                              cbmeet |   .0411668   .0421423     0.98   0.345    -.0492195    .1315531
                                     |
                               rsanc |
                                 L1. |   .4544884    1.04386     0.44   0.670    -1.784368    2.693345
                                     |
                               inrel |   .0082513   .5227057     0.02   0.988    -1.112841    1.129344
                                totd |   .8078538   .1304895     6.19   0.000     .5279817    1.087726
                                flev |   .4677845   .1245474     3.76   0.002     .2006568    .7349122
                               _cons |  -.2411344   .1708703    -1.41   0.180    -.6076147     .125346
                        ------------------------------------------------------------------------------
                        Instruments corresponding to the linear moment conditions:
                         1, model(fodev):
                           trisk fbric
                         2, model(level):
                           D.trisk D.fbric
                         3, model(level):
                           bind fenex femex feric crcomind femric fexric cbmeet inrel L.rsanc totd
                           flev
                         4, model(level):
                           _cons
                        
                        . estat overid
                        
                        Sargan-Hansen test of the overidentifying restrictions
                        H0: overidentifying restrictions are valid
                        
                        2-step moment functions, 2-step weighting matrix       chi2(3)     =    0.8149
                                                                               Prob > chi2 =    0.8459
                        
                        2-step moment functions, 3-step weighting matrix       chi2(3)     =   15.0000
                                                                               Prob > chi2 =    0.0018
                        
                        . estat overid, difference
                        
                        Sargan-Hansen (difference) test of the overidentifying restrictions
                        H0: (additional) overidentifying restrictions are valid
                        
                        2-step weighting matrix from full model
                        
                                          | Excluding                   | Difference                  
                        Moment conditions |       chi2     df         p |        chi2     df         p
                        ------------------+-----------------------------+-----------------------------
                          1, model(fodev) |     0.0000      2    1.0000 |      0.8149      1    0.3667
                          2, model(level) |     0.0000      2    1.0000 |      0.8149      1    0.3667
                          3, model(level) |          .     -9         . |           .      .         .
                             model(level) |          .    -11         . |           .      .         .
                        I however, do not know whether this result is reliable considering you comment "The coefficient of your lagged dependent variable is significantly negative. This hardly makes sense in any context and indicates that the applied method is not working properly for your data set." And the moments condition exceeding number of groups.

                        Comment


                        • #27
                          Originally posted by Sebastian Kripfganz View Post
                          1. There is no fixed threshold and I do not want to state a number that is then quoted by others out of context. The more groups, the merrier.
                          2. You could just use a simple 2SLS estimator. You could possibly still use the GMM estimator with few overidentifying restrictions but probably should restrict yourself to the one-step estimator then to avoid estimating the weighting matrix.
                          3. You could do a fixed-effects IV estimation, see xtivreg.
                          Dear Dr. Kripfganz,
                          if you could have please a look at my post I would be very thankful.
                          https://www.statalist.org/forums/for...eg-or-xtabond2

                          Comment

                          Working...
                          X