Announcement

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

  • #31
    Dear Sebastian,

    I have another concern. I am wondering whether the order of the variables between brackets affect the results.
    Code:
    xtabond2 tfp_mgtrendrobust lagTFP lropen_constant  lfdi seconary_school_gross year* ,gmmstyle(lropen_constant  lfdi ,lag(2 2) equation(level) collapse ) gmmstyle(lropen_constant  lfdi,lag(2 2) equation(diff) collapse ) gmmstyle(tfp_mgtrendrobust, lag(1 1) eq(diff)) gmm(tfp_mgtrendrobust, lag(1 1) eq(level)) iv( year* seconary_school_gross , eq (level)) iv(seconary_school_gross, eq (diff))robust small two
    Code:
    xtabond2 tfp_mgtrendrobust lagTFP lropen_constant  lfdi seconary_school_gross year*  ,gmmstyle(lropen_constant  lfdi ,lag(2 2) equation(level) collapse ) gmmstyle(lropen_constant  lfdi,lag(2 2) equation(diff) collapse ) gmmstyle(tfp_mgtrendrobust, lag(1 1) eq(diff)) gmm(tfp_mgtrendrobust, lag(1 1) eq(level)) iv(seconary_school_gross year*  , eq (level)) iv(seconary_school_gross, eq (diff))robust small two
    I have used these two commands. I have got different results. The only difference is the order of variables between
    Code:
    iv(seconary_school_gross year*  , eq (level))
    Code:
    iv( year* seconary_school_gross , eq (level))
    Do you have an explanation?

    Many thanks,
    Aya

    Comment


    • #32
      1. If lagTFP yields different results compared to L.tfpmgtrendrobust, then I would suspect that you did not create the variable lagTFP properly. There should not be any difference.
      2. The statement "two-period lagged levels and first differences of the explanatory variables (FDI and openness) and one-period lagged TFP" does not make clear whether these are instruments for the first-differenced or the level model. One-period lagged TFP is not a valid instrument. In the first-differenced model, you need to use at least the second lag of the dependent variable. Also, I advocate against using the gmmstyle() option without the equation() suboption because it is easy to be confused about which instruments it actually creates for which model equation.
      3. Changing the order of the variables in your iv() option should not affect the coefficients of any other variable. If the coefficients of the variables in the iv() option change, then this is due to a multicolinearity problem. Changing the order of the coefficients leads to different year dummies to be dropped, which possibly changes the base year. I would again recommend to use the xtdpdgmm command instead. It has a teffects option that automatically only includes the nonredundant year dummies.
      https://www.kripfganz.de/stata/

      Comment


      • #33
        Hi Sebastian,

        Could you please help me with my coding in Xtabond2 as well?
        I am researching the effect of R&D expenditure on firm performance at the firm level. My code is as below

        I use "collapse" option
        Code:
        xtabond2 ROATotAsset L.RDI L.ROATotAsset Leverage FirmsSIZE Y2006-Y2017, gmm(RDI, lag(2 4) collapse) gmm(ROATotAsset, lag(1 1)) iv( Leverage FirmsSIZE) twostep robust noconstant
        Below is the result
        Code:
         xtabond2 ROATotAsset L.RDI L.ROATotAsset Leverage FirmsSIZE Y2006-Y2017, gmm(RDI, lag(2 4) collapse) gmm(ROATotAsset, lag(1 1)) 
        > iv( Leverage FirmsSIZE) twostep robust noconstant
        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: ASX_ID                          Number of obs      =      2778
        Time variable : Year                            Number of groups   =       441
        Number of instruments = 27                      Obs per group: min =         1
        Wald chi2(16) =     85.86                                      avg =      6.30
        Prob > chi2   =     0.000                                      max =        11
        ------------------------------------------------------------------------------
                     |              Corrected
         ROATotAsset |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
                 RDI |
                 L1. |     .00007   .0000939     0.75   0.456     -.000114     .000254
                     |
         ROATotAsset |
                 L1. |  -.2104898   .2646949    -0.80   0.426    -.7292823    .3083027
                     |
            Leverage |   .1261284   .2067197     0.61   0.542    -.2790348    .5312916
           FirmsSIZE |   3.481166   .9932038     3.50   0.000     1.534522     5.42781
               Y2006 |          0  (omitted)
               Y2007 |  -26.22326   7.115548    -3.69   0.000    -40.16948   -12.27704
               Y2008 |  -26.14865   7.198401    -3.63   0.000    -40.25726   -12.04005
               Y2009 |  -24.79157     6.7919    -3.65   0.000    -38.10345   -11.47969
               Y2010 |   -25.3663   7.153019    -3.55   0.000    -39.38596   -11.34664
               Y2011 |   -25.9895   7.452203    -3.49   0.000    -40.59555   -11.38345
               Y2012 |  -26.10406   7.440849    -3.51   0.000    -40.68786   -11.52026
               Y2013 |  -25.68699   7.298055    -3.52   0.000    -39.99091   -11.38306
               Y2014 |  -25.51451   7.668685    -3.33   0.001    -40.54485   -10.48416
               Y2015 |  -25.96863   7.415399    -3.50   0.000    -40.50255   -11.43471
               Y2016 |  -23.93911   6.994188    -3.42   0.001    -37.64747   -10.23076
               Y2017 |  -24.88442   7.372853    -3.38   0.001    -39.33495   -10.43389
        ------------------------------------------------------------------------------
        Instruments for first differences equation
          Standard
            D.(Leverage FirmsSIZE)
          GMM-type (missing=0, separate instruments for each period unless collapsed)
            L.ROATotAsset
            L(2/4).RDI collapsed
        Instruments for levels equation
          Standard
            Leverage FirmsSIZE
          GMM-type (missing=0, separate instruments for each period unless collapsed)
            D.ROATotAsset
            DL.RDI collapsed
        ------------------------------------------------------------------------------
        Arellano-Bond test for AR(1) in first differences: z =  -1.38  Pr > z =  0.167
        Arellano-Bond test for AR(2) in first differences: z =  -0.87  Pr > z =  0.382
        ------------------------------------------------------------------------------
        Sargan test of overid. restrictions: chi2(11)   = 304.06  Prob > chi2 =  0.000
          (Not robust, but not weakened by many instruments.)
        Hansen test of overid. restrictions: chi2(11)   =   9.13  Prob > chi2 =  0.609
          (Robust, but weakened by many instruments.)
        
        Difference-in-Hansen tests of exogeneity of instrument subsets:
          gmm(RDI, collapse lag(2 4))
            Hansen test excluding group:     chi2(7)    =   8.05  Prob > chi2 =  0.328
            Difference (null H = exogenous): chi2(4)    =   1.09  Prob > chi2 =  0.897
          iv(Leverage FirmsSIZE)
            Hansen test excluding group:     chi2(9)    =   9.02  Prob > chi2 =  0.435
            Difference (null H = exogenous): chi2(2)    =   0.11  Prob > chi2 =  0.944
        Without "Collapse" option
        Code:
        xtabond2 ROATotAsset L.RDI L.ROATotAsset Leverage FirmsSIZE Y2006-Y2017, gmm(RDI, lag(2 4)) gmm(ROATotAsset, lag(1 1)) iv( Leverage FirmsSIZE) twostep robust noconstant
        the result as follow
        Code:
         xtabond2 ROATotAsset L.RDI L.ROATotAsset Leverage FirmsSIZE Y2006-Y2017, gmm(RDI, lag(2 4)) gmm(ROATotAsset, lag(1 1)) iv( Lever
        > age FirmsSIZE) twostep robust noconstant
        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: ASX_ID                          Number of obs      =      2778
        Time variable : Year                            Number of groups   =       441
        Number of instruments = 60                      Obs per group: min =         1
        Wald chi2(16) =     87.01                                      avg =      6.30
        Prob > chi2   =     0.000                                      max =        11
        ------------------------------------------------------------------------------
                     |              Corrected
         ROATotAsset |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
                 RDI |
                 L1. |   .0000526   .0000513     1.03   0.305    -.0000479    .0001531
                     |
         ROATotAsset |
                 L1. |  -.2194823   .1209272    -1.81   0.070    -.4564952    .0175307
                     |
            Leverage |  -.0055094   .1438171    -0.04   0.969    -.2873856    .2763668
           FirmsSIZE |   2.842752   .7071274     4.02   0.000     1.456808    4.228696
               Y2006 |          0  (omitted)
               Y2007 |  -20.21974   4.994858    -4.05   0.000    -30.00949      -10.43
               Y2008 |  -20.32618   5.074112    -4.01   0.000    -30.27126   -10.38111
               Y2009 |  -20.04415   4.827525    -4.15   0.000    -29.50593   -10.58238
               Y2010 |  -20.63554   5.028991    -4.10   0.000    -30.49218    -10.7789
               Y2011 |   -20.9807   5.189968    -4.04   0.000    -31.15285   -10.80854
               Y2012 |  -20.97483   5.146687    -4.08   0.000    -31.06215   -10.88751
               Y2013 |    -20.564   5.061607    -4.06   0.000    -30.48456   -10.64343
               Y2014 |  -20.45792   5.117973    -4.00   0.000    -30.48896   -10.42688
               Y2015 |  -20.35898   5.072675    -4.01   0.000    -30.30124   -10.41672
               Y2016 |  -20.54744    5.08927    -4.04   0.000    -30.52223   -10.57266
               Y2017 |   -20.8605   5.342503    -3.90   0.000    -31.33161   -10.38938
        ------------------------------------------------------------------------------
        Instruments for first differences equation
          Standard
            D.(Leverage FirmsSIZE)
          GMM-type (missing=0, separate instruments for each period unless collapsed)
            L.ROATotAsset
            L(2/4).RDI
        Instruments for levels equation
          Standard
            Leverage FirmsSIZE
          GMM-type (missing=0, separate instruments for each period unless collapsed)
            D.ROATotAsset
            DL.RDI
        ------------------------------------------------------------------------------
        Arellano-Bond test for AR(1) in first differences: z =  -1.46  Pr > z =  0.144
        Arellano-Bond test for AR(2) in first differences: z =  -2.24  Pr > z =  0.025
        ------------------------------------------------------------------------------
        Sargan test of overid. restrictions: chi2(44)   =1468.88  Prob > chi2 =  0.000
          (Not robust, but not weakened by many instruments.)
        Hansen test of overid. restrictions: chi2(44)   =  36.49  Prob > chi2 =  0.782
          (Robust, but weakened by many instruments.)
        
        Difference-in-Hansen tests of exogeneity of instrument subsets:
          GMM instruments for levels
            Hansen test excluding group:     chi2(23)   =  19.07  Prob > chi2 =  0.697
            Difference (null H = exogenous): chi2(21)   =  17.42  Prob > chi2 =  0.686
          gmm(RDI, lag(2 4))
            Hansen test excluding group:     chi2(7)    =   9.45  Prob > chi2 =  0.222
            Difference (null H = exogenous): chi2(37)   =  27.04  Prob > chi2 =  0.886
          gmm(ROATotAsset, lag(1 1))
            Hansen test excluding group:     chi2(23)   =  12.57  Prob > chi2 =  0.961
            Difference (null H = exogenous): chi2(21)   =  23.92  Prob > chi2 =  0.297
          iv(Leverage FirmsSIZE)
            Hansen test excluding group:     chi2(42)   =  34.22  Prob > chi2 =  0.798
            Difference (null H = exogenous): chi2(2)    =   2.27  Prob > chi2 =  0.322
        Please help, whether my coding is correct?

        and, how to interpret the AR(2) test? whether >0.05, means that I cannot reject the null hypothesis (there is No autocorrelation )? is it good to have AR(2) >0.05? Here is the result for both code of AR(2) with collapse option, AR(2) is 0.382 while without "collapse" option, it is 0.025.

        I look forward to hearing from you. I appreciate your reply

        Regards,

        Annur

        Comment


        • #34
          It is highly unusual not to include a constant term in the model if you run a system GMM estimation. You should not include the Y2006 dummy. If there are "omitted" coefficients in the regression output, xtabond2 provides incorrect Sargan/Hansen overidentification tests. I recommend to use my xtdpdgmm command instead to avoid this problem.
          Ideally, you want to reject the AR(1) test but you do not want to reject the AR(2) test.

          The option gmm(ROATotAsset, lag(1 1)) produces invalid instruments! The first lag of the dependent variable is endogenous in the first-differenced model, and the contemporaneous change in the dependent variable is endogenous in the level model. I recommend to explicitly specify the equation() suboption to make sure that you understand which instruments are created by the respective option.
          https://www.kripfganz.de/stata/

          Comment


          • #35
            Hi Sebastian,

            Thank you for your reply. Here I tried to run based on the comment above.
            I took off "collapse" option and put equation (diff) suboption on gmm

            Code:
            xtabond2 ROATotAsset L.RDI L.ROATotAsset Leverage FirmsSIZE Y2007-Y2017, gmm(RDI, lag(2 4)) gmm(ROATotAsset, lag(1 1) equation(diff)) iv( Leverage FirmsSIZE) twostep robust
            the result:
            Code:
            . xtabond2 ROATotAsset L.RDI L.ROATotAsset Leverage FirmsSIZE Y2007-Y2017, gmm(RDI, lag(2 4)) gmm(ROATotAsset, lag(1 1) equation(d
            > iff)) iv( Leverage FirmsSIZE) twostep robust
            Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
            Y2015 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: ASX_ID                          Number of obs      =      2778
            Time variable : Year                            Number of groups   =       441
            Number of instruments = 50                      Obs per group: min =         1
            Wald chi2(14) =    337.53                                      avg =      6.30
            Prob > chi2   =     0.000                                      max =        11
            ------------------------------------------------------------------------------
                         |              Corrected
             ROATotAsset |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
            -------------+----------------------------------------------------------------
                     RDI |
                     L1. |  -8.36e-06   .0000358    -0.23   0.815    -.0000786    .0000618
                         |
             ROATotAsset |
                     L1. |  -.7483638   .0708283   -10.57   0.000    -.8871847   -.6095429
                         |
                Leverage |  -.3509785   .1351487    -2.60   0.009    -.6158651    -.086092
               FirmsSIZE |   .3596051   .0534211     6.73   0.000     .2549016    .4643086
                   Y2007 |  -.1472801   .2917553    -0.50   0.614    -.7191099    .4245497
                   Y2008 |  -.0589188   .3205547    -0.18   0.854    -.6871945    .5693569
                   Y2009 |   .0314549   .2808925     0.11   0.911    -.5190843     .581994
                   Y2010 |   .0480584   .2287607     0.21   0.834    -.4003044    .4964212
                   Y2011 |   .0859418    .208583     0.41   0.680    -.3228733    .4947569
                   Y2012 |    .060937   .2016827     0.30   0.763    -.3343537    .4562278
                   Y2013 |   .0526682   .2065554     0.25   0.799     -.352173    .4575094
                   Y2014 |   .0984129   .1049295     0.94   0.348     -.107245    .3040709
                   Y2016 |  -.2006608   .1825984    -1.10   0.272    -.5585471    .1572255
                   Y2017 |  -.1414778   .2121663    -0.67   0.505    -.5573162    .2743606
                   _cons |  -2.751541   .4013387    -6.86   0.000     -3.53815   -1.964931
            ------------------------------------------------------------------------------
            Instruments for first differences equation
              Standard
                D.(Leverage FirmsSIZE)
              GMM-type (missing=0, separate instruments for each period unless collapsed)
                L.ROATotAsset
                L(2/4).RDI
            Instruments for levels equation
              Standard
                Leverage FirmsSIZE
                _cons
              GMM-type (missing=0, separate instruments for each period unless collapsed)
                DL.RDI
            ------------------------------------------------------------------------------
            Arellano-Bond test for AR(1) in first differences: z =   0.15  Pr > z =  0.880
            Arellano-Bond test for AR(2) in first differences: z =  -2.33  Pr > z =  0.020
            ------------------------------------------------------------------------------
            Sargan test of overid. restrictions: chi2(35)   =  90.24  Prob > chi2 =  0.000
              (Not robust, but not weakened by many instruments.)
            Hansen test of overid. restrictions: chi2(35)   =  34.69  Prob > chi2 =  0.483
              (Robust, but weakened by many instruments.)
            
            Difference-in-Hansen tests of exogeneity of instrument subsets:
              GMM instruments for levels
                Hansen test excluding group:     chi2(25)   =  26.50  Prob > chi2 =  0.381
                Difference (null H = exogenous): chi2(10)   =   8.19  Prob > chi2 =  0.610
              gmm(ROATotAsset, eq(diff) lag(1 1))
                Hansen test excluding group:     chi2(25)   =  20.04  Prob > chi2 =  0.745
                Difference (null H = exogenous): chi2(10)   =  14.65  Prob > chi2 =  0.145
              iv(Leverage FirmsSIZE)
                Hansen test excluding group:     chi2(33)   =  32.79  Prob > chi2 =  0.477
                Difference (null H = exogenous): chi2(2)    =   1.90  Prob > chi2 =  0.387

            with equation(level) suboption
            Code:
            xtabond2 ROATotAsset L.RDI L.ROATotAsset Leverage FirmsSIZE Y2007-Y2017, gmm(RDI, lag(2 4)) gmm(ROATotAsset, lag(1 1) equation(level)) iv( Leverage FirmsSIZE) twostep robust
            the result
            Code:
            xtabond2 ROATotAsset L.RDI L.ROATotAsset Leverage FirmsSIZE Y2007-Y2017, gmm(RDI, lag(2 4)) gmm(ROATotAsset, lag(1 1) equation(l
            > evel)) iv( Leverage FirmsSIZE) twostep robust
            Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
            Y2015 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: ASX_ID                          Number of obs      =      2778
            Time variable : Year                            Number of groups   =       441
            Number of instruments = 50                      Obs per group: min =         1
            Wald chi2(14) =     57.10                                      avg =      6.30
            Prob > chi2   =     0.000                                      max =        11
            ------------------------------------------------------------------------------
                         |              Corrected
             ROATotAsset |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
            -------------+----------------------------------------------------------------
                     RDI |
                     L1. |   7.41e-06   .0000231     0.32   0.749    -.0000379    .0000528
                         |
             ROATotAsset |
                     L1. |   .1573693   .1235528     1.27   0.203    -.0847897    .3995284
                         |
                Leverage |  -.3018306   .1465762    -2.06   0.039    -.5891148   -.0145465
               FirmsSIZE |   .3217667   .0776132     4.15   0.000     .1696477    .4738858
                   Y2007 |   .1670106   .3293655     0.51   0.612     -.478534    .8125552
                   Y2008 |   .0139232   .2657302     0.05   0.958    -.5068983    .5347448
                   Y2009 |   .4400586   .2408315     1.83   0.068    -.0319624    .9120796
                   Y2010 |   .2485683   .1904438     1.31   0.192    -.1246947    .6218314
                   Y2011 |   .0905946   .1272116     0.71   0.476    -.1587356    .3399248
                   Y2012 |   .0791637   .1023267     0.77   0.439    -.1213929    .2797203
                   Y2013 |   .0271137   .1020032     0.27   0.790    -.1728089    .2270364
                   Y2014 |   .0232287    .067204     0.35   0.730    -.1084888    .1549461
                   Y2016 |  -.1628063   .1910053    -0.85   0.394    -.5371698    .2115571
                   Y2017 |  -.0169423   .2093019    -0.08   0.935    -.4271665    .3932819
                   _cons |  -2.427127   .5544456    -4.38   0.000     -3.51382   -1.340433
            ------------------------------------------------------------------------------
            Instruments for first differences equation
              Standard
                D.(Leverage FirmsSIZE)
              GMM-type (missing=0, separate instruments for each period unless collapsed)
                L(2/4).RDI
            Instruments for levels equation
              Standard
                Leverage FirmsSIZE
                _cons
              GMM-type (missing=0, separate instruments for each period unless collapsed)
                DL.ROATotAsset
                DL.RDI
            ------------------------------------------------------------------------------
            Arellano-Bond test for AR(1) in first differences: z =  -2.25  Pr > z =  0.025
            Arellano-Bond test for AR(2) in first differences: z =  -0.71  Pr > z =  0.479
            ------------------------------------------------------------------------------
            Sargan test of overid. restrictions: chi2(35)   = 118.57  Prob > chi2 =  0.000
              (Not robust, but not weakened by many instruments.)
            Hansen test of overid. restrictions: chi2(35)   =  37.98  Prob > chi2 =  0.335
              (Robust, but weakened by many instruments.)
            
            Difference-in-Hansen tests of exogeneity of instrument subsets:
              GMM instruments for levels
                Hansen test excluding group:     chi2(15)   =   7.89  Prob > chi2 =  0.928
                Difference (null H = exogenous): chi2(20)   =  30.08  Prob > chi2 =  0.069
              gmm(ROATotAsset, eq(level) lag(1 1))
                Hansen test excluding group:     chi2(25)   =  22.51  Prob > chi2 =  0.606
                Difference (null H = exogenous): chi2(10)   =  15.46  Prob > chi2 =  0.116
              iv(Leverage FirmsSIZE)
                Hansen test excluding group:     chi2(33)   =  31.85  Prob > chi2 =  0.524
                Difference (null H = exogenous): chi2(2)    =   6.12  Prob > chi2 =  0.047
            
            
            .

            I will try to run using XTDPDGMM and compare the result to Xtabond2, but at this time, I need your advice whether the above result is still wrong?

            Appreciate your reply

            Regards,

            Annur

            Comment


            • #36
              Still, the first lag of ROATotAsset is not a valid instrument in the first-differenced model because it is correlated with the first-differenced error term by construction. You might specify something like gmm(ROATotAsset, lag(2 2) equation(diff)) gmm(ROATotAsset, lag(1 1) equation(level)). Similarly, I recommend to be explicit about the equation when specifying the iv() option.
              https://www.kripfganz.de/stata/

              Comment


              • #37
                Hi Sebastian,

                Thank you for your reply.
                Here is the result for putting equation ( ) suboption in iv

                Code:
                xtabond2 ROATotAsset L.RDI L.ROATotAsset Leverage FirmsSIZE Y2007-Y2017, gmm(RDI, lag(2 4) collapse) gmm(ROATotAsset, lag(2 2) equation(diff)) gmm(ROATotAsset, lag(1 1) equation(level)) iv( Leverage, equation(diff)) iv(FirmsSIZE, equation(diff)) twostep robust
                the result:

                Code:
                . xtabond2 ROATotAsset L.RDI L.ROATotAsset Leverage FirmsSIZE Y2007-Y2017, gmm(RDI, lag(2 4) collapse) gmm(ROATotAsset, lag(2 2) e
                > quation(diff)) gmm(ROATotAsset, lag(1 1) equation(level)) iv( Leverage, equation(diff)) iv(FirmsSIZE, equation(diff)) twostep ro
                > bust
                Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
                Y2015 dropped due to collinearity
                
                Dynamic panel-data estimation, two-step system GMM
                ------------------------------------------------------------------------------
                Group variable: ASX_ID                          Number of obs      =      2778
                Time variable : Year                            Number of groups   =       441
                Number of instruments = 27                      Obs per group: min =         1
                Wald chi2(14) =     47.67                                      avg =      6.30
                Prob > chi2   =     0.000                                      max =        11
                ------------------------------------------------------------------------------
                             |              Corrected
                 ROATotAsset |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                -------------+----------------------------------------------------------------
                         RDI |
                         L1. |   .0000108   .0000241     0.45   0.654    -.0000364     .000058
                             |
                 ROATotAsset |
                         L1. |   .0776424   .0876605     0.89   0.376     -.094169    .2494537
                             |
                    Leverage |    -.25188   .2217847    -1.14   0.256      -.68657    .1828099
                   FirmsSIZE |   .8832735   .2868349     3.08   0.002     .3210874     1.44546
                       Y2007 |   .3852702    1.21039     0.32   0.750     -1.98705    2.757591
                       Y2008 |   .4201616   .4096403     1.03   0.305    -.3827186    1.223042
                       Y2009 |   .2280198   .5453144     0.42   0.676    -.8407768    1.296816
                       Y2010 |   .0226068   .2729474     0.08   0.934    -.5123603     .557574
                       Y2011 |   .0023614   .2619776     0.01   0.993    -.5111052     .515828
                       Y2012 |  -.1043462   .2335706    -0.45   0.655    -.5621361    .3534437
                       Y2013 |   .0298407   .2196026     0.14   0.892    -.4005724    .4602539
                       Y2014 |   .0978155   .2616853     0.37   0.709    -.4150782    .6107093
                       Y2016 |   -.040959   .5536001    -0.07   0.941    -1.125995    1.044077
                       Y2017 |  -.0257486   .4690492    -0.05   0.956    -.9450681    .8935709
                       _cons |  -6.444881   2.070032    -3.11   0.002    -10.50207   -2.387693
                ------------------------------------------------------------------------------
                Instruments for first differences equation
                  Standard
                    D.FirmsSIZE
                    D.Leverage
                  GMM-type (missing=0, separate instruments for each period unless collapsed)
                    L2.ROATotAsset
                    L(2/4).RDI collapsed
                Instruments for levels equation
                  Standard
                    _cons
                  GMM-type (missing=0, separate instruments for each period unless collapsed)
                    DL.ROATotAsset
                    DL.RDI collapsed
                ------------------------------------------------------------------------------
                Arellano-Bond test for AR(1) in first differences: z =  -2.26  Pr > z =  0.024
                Arellano-Bond test for AR(2) in first differences: z =  -1.15  Pr > z =  0.250
                ------------------------------------------------------------------------------
                Sargan test of overid. restrictions: chi2(12)   =  86.77  Prob > chi2 =  0.000
                  (Not robust, but not weakened by many instruments.)
                Hansen test of overid. restrictions: chi2(12)   =  10.79  Prob > chi2 =  0.547
                  (Robust, but weakened by many instruments.)
                
                Difference-in-Hansen tests of exogeneity of instrument subsets:
                  GMM instruments for levels
                    Hansen test excluding group:     chi2(1)    =   0.09  Prob > chi2 =  0.770
                    Difference (null H = exogenous): chi2(11)   =  10.70  Prob > chi2 =  0.469
                  gmm(RDI, collapse lag(2 4))
                    Hansen test excluding group:     chi2(8)    =   7.46  Prob > chi2 =  0.488
                    Difference (null H = exogenous): chi2(4)    =   3.33  Prob > chi2 =  0.505
                  gmm(ROATotAsset, eq(diff) lag(2 2))
                    Hansen test excluding group:     chi2(2)    =   1.62  Prob > chi2 =  0.445
                    Difference (null H = exogenous): chi2(10)   =   9.17  Prob > chi2 =  0.516
                  gmm(ROATotAsset, eq(level) lag(1 1))
                    Hansen test excluding group:     chi2(2)    =   1.58  Prob > chi2 =  0.453
                    Difference (null H = exogenous): chi2(10)   =   9.21  Prob > chi2 =  0.513
                  iv(Leverage, eq(diff))
                    Hansen test excluding group:     chi2(11)   =   8.24  Prob > chi2 =  0.691
                    Difference (null H = exogenous): chi2(1)    =   2.55  Prob > chi2 =  0.111
                  iv(FirmsSIZE, eq(diff))
                    Hansen test excluding group:     chi2(11)   =   9.36  Prob > chi2 =  0.588
                    Difference (null H = exogenous): chi2(1)    =   1.42  Prob > chi2 =  0.233
                I am still confused about the equation ( ) suboption in iv ( ). If I do not use the lagged variable as an exogenous variable, do I still need to use equation ( ) suboption?
                Appreciate your help

                Regards, Annur

                Comment


                • #38
                  iv(Leverage) without the equation() suboption is not the same as iv(Leverage, equation(diff)). It is also not the same as specifying both iv(Leverage, equation(diff)) iv(Leverage, equation(level)) jointly. It depends on you what you would like to achieve. If you do not know what iv(Leverage) without the equation() suboption does, do not use it! Technical details can be found in David Roodman's "how to do xtabond2" paper.
                  https://www.kripfganz.de/stata/

                  Comment


                  • #39
                    Dear Statalisters, this is my code and and results. Is the specification of the code correct?
                    Secondly, in the gmm() do you use the lag of the dependent variable or you use the dependent variable?
                    Code:xtabond2 gdpg gdppc_lag rir hc pop fdi afdi trade inf afdi_fdi i.yearavg5 , gmm(gdpg afdi fdi,laglimits(2 2)eq(level)collapse) gmm(gdpg fdi, laglimits(1 1)eq(diff) collapse) iv(hc i.yearavg5 trade inf rir pop, eq(level)) nodiffsargan robust orthogonal small

                    Results
                    xtabond2 gdpg gdppc_lag rir hc pop fdi afdi trade inf afdi_fdi i.yearavg5 , gmm(gdpg afdi
                    > fdi,laglimits(2 2)eq(level)collapse) gmm(gdpg fdi, laglimits(1 1)eq(diff) collapse) iv(h
                    > c i.yearavg5 trade inf rir pop, eq(level)) nodiffsargan robust orthogonal 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.

                    Dynamic panel-data estimation, one-step system GMM
                    ------------------------------------------------------------------------------
                    Group variable: countryID Number of obs = 1395
                    Time variable : year Number of groups = 39
                    Number of instruments = 19 Obs per group: min = 9
                    F(18, 38) = 1.98 avg = 35.77
                    Prob > F = 0.038 max = 44
                    ------------------------------------------------------------------------------
                    | Robust
                    gdpg | Coef. Std. Err. t P>|t| [95% Conf. Interval]
                    -------------+----------------------------------------------------------------
                    gdppc_lag | 2.573154 1.328282 1.94 0.060 -.1158126 5.262121
                    rir | .1522238 .0919411 1.66 0.106 -.0339013 .338349
                    hc | -1.273458 2.101048 -0.61 0.548 -5.526807 2.979891
                    pop | .0099557 .0487209 0.20 0.839 -.0886746 .108586
                    fdi | -2.386882 1.432775 -1.67 0.104 -5.287384 .5136195
                    afdi | -2.594058 2.765893 -0.94 0.354 -8.193317 3.0052
                    trade | .0665036 .0612053 1.09 0.284 -.0574 .1904072
                    inf | .0077725 .0465868 0.17 0.868 -.0865375 .1020825
                    afdi_fdi | .2083395 .1811483 1.15 0.257 -.1583759 .575055
                    |
                    yearavg5 |
                    1 | 0 (empty)
                    2 | .8940954 2.17788 0.41 0.684 -3.514792 5.302983
                    3 | 4.283092 3.251295 1.32 0.196 -2.29881 10.865
                    4 | 5.4885 2.678922 2.05 0.047 .0653067 10.91169
                    5 | 4.807664 2.980047 1.61 0.115 -1.225126 10.84045
                    6 | 4.529856 2.804088 1.62 0.114 -1.146723 10.20643
                    7 | 6.320317 3.686288 1.71 0.095 -1.142183 13.78282
                    8 | 5.6117 4.030552 1.39 0.172 -2.547725 13.77113
                    9 | 11.44193 7.670253 1.49 0.144 -4.085684 26.96955
                    |
                    _cons | -2.628024 4.004424 -0.66 0.516 -10.73456 5.478508
                    ------------------------------------------------------------------------------
                    Instruments for orthogonal deviations equation
                    GMM-type (missing=0, separate instruments for each period unless collapsed)
                    L.(gdpg fdi) collapsed
                    Instruments for levels equation
                    Standard
                    hc 1b.yearavg5 2.yearavg5 3.yearavg5 4.yearavg5 5.yearavg5 6.yearavg5
                    7.yearavg5 8.yearavg5 9.yearavg5 trade inf rir pop
                    _cons
                    GMM-type (missing=0, separate instruments for each period unless collapsed)
                    DL2.(gdpg afdi fdi) collapsed
                    ------------------------------------------------------------------------------
                    Arellano-Bond test for AR(1) in first differences: z = -1.70 Pr > z = 0.090
                    Arellano-Bond test for AR(2) in first differences: z = 1.02 Pr > z = 0.308
                    ------------------------------------------------------------------------------
                    Sargan test of overid. restrictions: chi2(0) = 84.34 Prob > chi2 = .
                    (Not robust, but not weakened by many instruments.)
                    Hansen test of overid. restrictions: chi2(0) = 12.50 Prob > chi2 = .
                    (Robust, but weakened by many instruments.)


                    Comment


                    • #40
                      Dear all,
                      Hi,

                      I am using the following code and my Hansen difference test for dependent variable is significant. following is the code I am using. i am using industry year and country dummies. Following is the code and results. I am new in stata blog. I am trying to paste my result table also but I am not able to paste it here in same format. could you please guide me how can I do that. Further, please see my results below and suggest me how can I make my results better and what could be the problem. I will be very thankful to you for your help.

                      Depnedent variable=RK
                      Indep variable= FF CA TB LEV SIZE NDF FF_NDF
                      I have interaction term in my model. will it be also use as instrument?

                      [xtabond2 win_RK l.win_RK FF CA TB LEV SIZE NDF FF_NDF yr2004a-yr2014a con1a-con19a sic1a-sic48a, gmm (win_RK, lag(2 2)) gmm (TB LEV NDF FF FF _NDF CA SIZE, lag 1 1)) iv(yr2004a-yr2014a con1a-con19a sic1a-sic48a, equation(level)) twostep robust orthogonal small]

                      Favoring speed over space. To switch, type or click on mata: mata set matafavor space, per
                      > m.
                      Warning: Two-step estimated covariance matrix of moments is singular.
                      Using a generalized inverse to calculate optimal weighting matrix for two-step estimatio
                      > n.
                      Difference-in-Sargan/Hansen statistics may be negative.

                      Dynamic panel-data estimation, two-step system GMM

                      Group variable: compid Number of obs = 3937
                      Time variable : year Number of groups = 491
                      Number of instruments = 259 Obs per group: min = 1
                      F(86, 490) = 687.82 avg = 8.02
                      Prob > F = 0.000 max = 12



                      Instruments for orthogonal deviations equation
                      GMM-type (missing=0, separate instruments for each period unless collapsed)
                      L.(TB LEV NDF FF FF_NDF CA SIZE)
                      L2.win_RK
                      Instruments for levels equation
                      Standard
                      yr2004a yr2005a yr2006a yr2007a yr2008a yr2009a yr2010a yr2011a yr2012a
                      yr2013a yr2014a con1a con2a con3a con4a con5a con6a con7a con8a con9a
                      con10a con11a con12a con13a con14a con15a con16a con17a con18a con19a
                      sic1a sic2a sic3a sic4a sic5a sic6a sic7a sic8a sic9a sic10a sic11a sic12a
                      sic13a sic14a sic15a sic16a sic17a sic18a sic19a sic20a sic21a sic22a
                      sic23a sic24a sic25a sic26a sic27a sic28a sic29a sic30a sic31a sic32a
                      sic33a sic34a sic35a sic36a sic37a sic38a sic39a sic40a sic41a sic42a
                      sic43a sic44a sic45a sic46a sic47a sic48a
                      _cons
                      GMM-type (missing=0, separate instruments for each period unless collapsed)
                      D.(TB LEV NDF FF FF_NDF CA SIZE)
                      DL.win_RK

                      Arellano-Bond test for AR(1) in first differences: z = -3.68 Pr > z = 0.000
                      Arellano-Bond test for AR(2) in first differences: z = 0.77 Pr > z = 0.442

                      Sargan test of overid. restrictions: chi2(172) = 563.69 Prob > chi2 = 0.000
                      (Not robust, but not weakened by many instruments.)
                      Hansen test of overid. restrictions: chi2(172) = 194.12 Prob > chi2 = 0.119
                      (Robust, but weakened by many instruments.)

                      Difference-in-Hansen tests of exogeneity of instrument subsets:
                      GMM instruments for levels
                      Hansen test excluding group: chi2(77) = 92.48 Prob > chi2 = 0.110
                      Difference (null H = exogenous): chi2(95) = 101.64 Prob > chi2 = 0.302
                      gmm(win_RK, lag(2 2))
                      Hansen test excluding group: chi2(150) = 151.71 Prob > chi2 = 0.446
                      Difference (null H = exogenous): chi2(22) = 42.41 Prob > chi2 = 0.006
                      gmm(TB LEV NDF FF FF_NDF CA SIZE, lag(1 1))
                      Hansen test excluding group: chi2(11) = 16.64 Prob > chi2 = 0.119
                      Difference (null H = exogenous): chi2(161) = 177.49 Prob > chi2 = 0.177
                      iv(yr2004a yr2005a yr2006a yr2007a yr2008a yr2009a yr2010a yr2011a yr2012a yr2013a yr201
                      > 4a con1a con2a con3a con4a con5a con6a con7a con8a con9a con10a con11a con12a con13a con
                      > 14a con15a con16a con17a con18a con19a sic1a sic2a sic3a sic4a sic5a sic6a sic7a sic8a s
                      > ic9a sic10a sic11a sic12a sic13a sic14a sic15a sic16a sic17a sic18a sic19a sic20a sic21a
                      > sic22a sic23a sic24a sic25a sic26a sic27a sic28a sic29a sic30a sic31a sic32a sic33a sic
                      > 34a sic35a sic36a sic37a sic38a sic39a sic40a sic41a sic42a sic43a sic44a sic45a sic46a
                      > sic47a sic48a, eq(level))
                      Hansen test excluding group: chi2(97) = 118.54 Prob > chi2 = 0.068
                      Difference (null H = exogenous): chi2(75) = 75.59 Prob > chi2 = 0.459
                      Last edited by Atiqa Rehman; 13 Jul 2020, 10:13.

                      Comment


                      • #41
                        Please see my 2019 London Stata Conference presentation for examples on the correct specification:
                        Also note the following two major concerns about your use of xtabond2:
                        • There is a bug that leads to an incorrect computation of the degrees of freedom for the overidentification tests, and therefore also to incorrect p-values, if there are omitted (or "empty") coeffcients in the regression output. This typically occurs when dummy variables are specified with the factor variable notation.
                        • There is a bug that leads to incorrect coefficient estimates when forward-orthogonal deviations are used.
                        Both issues are discussed in the above-mentioned presentation. You might want to consider using my xtdpdgmm command instead of xtabond2 to avoid these problems.
                        https://www.kripfganz.de/stata/

                        Comment


                        • #42
                          Hi Sebastian,

                          I need your help with my coding. I have a problem with the Hansen test which is not >0.05. Can I still use this result or I need to put another coding?
                          Here is my coding. I specify the year and excluded the Year 2006 and 2007 because it was omitted or emptied.

                          Code:
                          xtabond2 ROATotAsset L.RDI L.ROATotAsset Leverage FirmsSIZE Y2008-Y2017, gmm(RDI, lag(2 4)) gmm(ROATotAsset, lag(1 1) equation(level)) iv(Leverage FirmsSIZE, equation(level)) orthogonal small twostep robust
                          below is the result
                          Code:
                          xtabond2 ROATotAsset L.RDI L.ROATotAsset Leverage FirmsSIZE Y2008-Y2017, gmm(RDI, lag(2 4)) gmm(ROATotAsset, lag(1 1) equation(l
                          > evel)) iv(Leverage FirmsSIZE, equation(level)) orthogonal small twostep robust
                          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: ASX_ID                          Number of obs      =      5349
                          Time variable : Year                            Number of groups   =       487
                          Number of instruments = 50                      Obs per group: min =         7
                          F(14, 486)    =      3.27                                      avg =     10.98
                          Prob > F      =     0.000                                      max =        11
                          ------------------------------------------------------------------------------
                                       |              Corrected
                           ROATotAsset |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                          -------------+----------------------------------------------------------------
                                   RDI |
                                   L1. |   .0000209   6.82e-06     3.06   0.002     7.49e-06    .0000343
                                       |
                           ROATotAsset |
                                   L1. |   .3095717    .123973     2.50   0.013     .0659826    .5531609
                                       |
                              Leverage |  -.0085758   .0039637    -2.16   0.031    -.0163639   -.0007877
                             FirmsSIZE |   .0452189   .0199084     2.27   0.024     .0061017     .084336
                                 Y2008 |  -.3519196   .3249019    -1.08   0.279    -.9903053    .2864662
                                 Y2009 |  -.2019102   .2167678    -0.93   0.352     -.627828    .2240077
                                 Y2010 |   .0571501   .3583073     0.16   0.873    -.6468727    .7611728
                                 Y2011 |  -.2643039   .2082071    -1.27   0.205    -.6734011    .1447933
                                 Y2012 |  -.2047061   .2294542    -0.89   0.373    -.6555508    .2461387
                                 Y2013 |  -.1699912   .2505895    -0.68   0.498    -.6623638    .3223815
                                 Y2014 |  -1.189393   .7346716    -1.62   0.106    -2.632918    .2541314
                                 Y2015 |  -.7970928   .4759323    -1.67   0.095    -1.732232    .1380462
                                 Y2016 |  -.1173868   .4155981    -0.28   0.778    -.9339778    .6992042
                                 Y2017 |   -1.08205   1.027388    -1.05   0.293    -3.100721    .9366209
                                 _cons |  -.0312545   .1951929    -0.16   0.873    -.4147807    .3522716
                          ------------------------------------------------------------------------------
                          Instruments for orthogonal deviations equation
                            GMM-type (missing=0, separate instruments for each period unless collapsed)
                              L(2/4).RDI
                          Instruments for levels equation
                            Standard
                              Leverage FirmsSIZE
                              _cons
                            GMM-type (missing=0, separate instruments for each period unless collapsed)
                              DL.ROATotAsset
                              DL.RDI
                          ------------------------------------------------------------------------------
                          Arellano-Bond test for AR(1) in first differences: z =  -2.97  Pr > z =  0.003
                          Arellano-Bond test for AR(2) in first differences: z =  -1.10  Pr > z =  0.273
                          ------------------------------------------------------------------------------
                          Sargan test of overid. restrictions: chi2(35)   = 256.24  Prob > chi2 =  0.000
                            (Not robust, but not weakened by many instruments.)
                          Hansen test of overid. restrictions: chi2(35)   =  76.51  Prob > chi2 =  0.000 --> this is my concern
                            (Robust, but weakened by many instruments.)
                          
                          Difference-in-Hansen tests of exogeneity of instrument subsets:
                            GMM instruments for levels
                              Hansen test excluding group:     chi2(15)   =  25.21  Prob > chi2 =  0.047
                              Difference (null H = exogenous): chi2(20)   =  51.30  Prob > chi2 =  0.000
                            gmm(ROATotAsset, eq(level) lag(1 1))
                              Hansen test excluding group:     chi2(25)   =  64.68  Prob > chi2 =  0.000
                              Difference (null H = exogenous): chi2(10)   =  11.83  Prob > chi2 =  0.297
                            iv(Leverage FirmsSIZE, eq(level))
                              Hansen test excluding group:     chi2(33)   =  69.60  Prob > chi2 =  0.000
                              Difference (null H = exogenous): chi2(2)    =   6.91  Prob > chi2 =  0.032
                          Appreciate your help

                          Comment


                          • #43
                            Please notice that xtabond2 has a bug that may lead to incorrect results when using the orthogonal option. I recommend to instead use my xtdpdgmm command to circumvent this problem. For details, see my 2019 London Stata Conference presentation. Therein, you can also find a section on model selection that may be of help to find a specification that does not reject the Hansen test. Further notice that you have specificed time dummies as regressors but not as instruments. Any exogenous regressor must also be included in the set of instruments. Again, see my presentation slides for a treatment of time dummies.
                            Last edited by Sebastian Kripfganz; 07 Oct 2020, 06:17.
                            https://www.kripfganz.de/stata/

                            Comment


                            • #44
                              Hi Sebastian,

                              Thank you for your reply.
                              I changed the code and put years dummy as an instrument variable. First, I run original code for the whole year dummy (2006-2017). Based on the result shown that year 2006 and 2008 is omitted, thus I took those two years from the code. Please give me your feedback


                              Here is code:
                              Code:
                              xtabond2 ROATotAsset L.RDI L.ROATotAsset Leverage FirmsSIZE Y2007 Y2009-Y2017, gmm(RDI, lag(2 4) equation(diff)) gmm(ROATotAsset, lag(1 1) equation(level)) iv(Leverage FirmsSIZE Y2007 Y2009-Y2017, equation(diff)) small twostep robust
                              result
                              Code:
                               xtabond2 ROATotAsset L.RDI L.ROATotAsset Leverage FirmsSIZE Y2007 Y2009-Y2017, gmm(RDI, lag(2 4) equation(diff)) gmm(ROATotAsset
                              > , lag(1 1) equation(level)) iv(Leverage FirmsSIZE Y2007 Y2009-Y2017, equation(diff)) small twostep robust
                              Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
                              
                              Dynamic panel-data estimation, two-step system GMM
                              ------------------------------------------------------------------------------
                              Group variable: ASX_ID                          Number of obs      =      5349
                              Time variable : Year                            Number of groups   =       487
                              Number of instruments = 50                      Obs per group: min =         7
                              F(14, 486)    =      5.56                                      avg =     10.98
                              Prob > F      =     0.000                                      max =        11
                              ------------------------------------------------------------------------------
                                           |              Corrected
                               ROATotAsset |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                              -------------+----------------------------------------------------------------
                                       RDI |
                                       L1. |   .0002171   .0002088     1.04   0.299    -.0001933    .0006274
                                           |
                               ROATotAsset |
                                       L1. |   .3197645   .1536992     2.08   0.038     .0177677    .6217614
                                           |
                                  Leverage |  -.0048092   .0020072    -2.40   0.017     -.008753   -.0008653
                                 FirmsSIZE |   .0521182   .0334832     1.56   0.120    -.0136715    .1179078
                                     Y2007 |   .0695942   .0460538     1.51   0.131    -.0208949    .1600833
                                     Y2009 |   -.082469   .0424372    -1.94   0.053    -.1658521    .0009141
                                     Y2010 |  -.0127756   .0375747    -0.34   0.734    -.0866044    .0610533
                                     Y2011 |  -.0086805   .0436806    -0.20   0.843    -.0945067    .0771457
                                     Y2012 |  -.0520049   .0465991    -1.12   0.265    -.1435653    .0395556
                                     Y2013 |   -.099023   .0532375    -1.86   0.063    -.2036271    .0055812
                                     Y2014 |  -.1462322   .0518373    -2.82   0.005    -.2480851   -.0443792
                                     Y2015 |  -.2712174   .1253459    -2.16   0.031    -.5175041   -.0249306
                                     Y2016 |  -.2246637   .1189399    -1.89   0.060    -.4583636    .0090362
                                     Y2017 |  -.1497271   .1495898    -1.00   0.317    -.4436497    .1441955
                                     _cons |  -.3698572   .1965162    -1.88   0.060    -.7559835    .0162691
                              ------------------------------------------------------------------------------
                              Instruments for first differences equation
                                Standard
                                  D.(Leverage FirmsSIZE Y2007 Y2009 Y2010 Y2011 Y2012 Y2013 Y2014 Y2015
                                  Y2016 Y2017)
                                GMM-type (missing=0, separate instruments for each period unless collapsed)
                                  L(2/4).RDI
                              Instruments for levels equation
                                Standard
                                  _cons
                                GMM-type (missing=0, separate instruments for each period unless collapsed)
                                  DL.ROATotAsset
                              ------------------------------------------------------------------------------
                              Arellano-Bond test for AR(1) in first differences: z =  -2.64  Pr > z =  0.008
                              Arellano-Bond test for AR(2) in first differences: z =  -0.43  Pr > z =  0.669
                              ------------------------------------------------------------------------------
                              Sargan test of overid. restrictions: chi2(35)   = 275.50  Prob > chi2 =  0.000
                                (Not robust, but not weakened by many instruments.)
                              Hansen test of overid. restrictions: chi2(35)   =  43.84  Prob > chi2 =  0.145
                                (Robust, but weakened by many instruments.)
                              
                              Difference-in-Hansen tests of exogeneity of instrument subsets:
                                GMM instruments for levels
                                  Hansen test excluding group:     chi2(25)   =  25.64  Prob > chi2 =  0.427
                                  Difference (null H = exogenous): chi2(10)   =  18.19  Prob > chi2 =  0.052
                                gmm(RDI, eq(diff) lag(2 4))
                                  Hansen test excluding group:     chi2(8)    =   7.32  Prob > chi2 =  0.502
                                  Difference (null H = exogenous): chi2(27)   =  36.51  Prob > chi2 =  0.104
                                gmm(ROATotAsset, eq(level) lag(1 1))
                                  Hansen test excluding group:     chi2(25)   =  25.64  Prob > chi2 =  0.427
                                  Difference (null H = exogenous): chi2(10)   =  18.19  Prob > chi2 =  0.052
                                iv(Leverage FirmsSIZE Y2007 Y2009 Y2010 Y2011 Y2012 Y2013 Y2014 Y2015 Y2016 Y2017, eq(diff))
                                  Hansen test excluding group:     chi2(23)   =  21.89  Prob > chi2 =  0.527
                                  Difference (null H = exogenous): chi2(12)   =  21.95  Prob > chi2 =  0.038
                              
                              
                              .
                              Appreciate your help

                              Comment


                              • #45
                                The Hansen test still does not appear entirely satisfying. There could be different reasons, e.g. that Leverage and FirmsSIZE should not be treated as strictly exogenous or that the mean stationarity assumption is not satisfied for the eq(level) instruments.
                                https://www.kripfganz.de/stata/

                                Comment

                                Working...
                                X