Announcement

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

  • #31
    Code:
    xtabond2 ..., orthogonal gmmstyle(l.(gini_disp EFW ln_Income ln_pl_i fyr_sch_sec myr_sch_sec), laglimits(1 .) collapse equation(diff))
    and
    Code:
    xtdpdgmm ..., model(fod) gmm(l.(gini_disp EFW ln_Income ln_pl_i fyr_sch_sec myr_sch_sec), lag(1 .) collapse)
    are not equivalent. To make the two equivalent, you either need to specify laglimits(2 .) with xtabond2, or lag(0 .) with xtdpdgmm. The coefficient estimates will nevertheless still not coincide because of the bug in xtabond2 that you mentioned.
    https://www.kripfganz.de/stata/

    Comment


    • #32
      Originally posted by Sebastian Kripfganz View Post
      Code:
      xtabond2 ..., orthogonal gmmstyle(l.(gini_disp EFW ln_Income ln_pl_i fyr_sch_sec myr_sch_sec), laglimits(1 .) collapse equation(diff))
      and
      Code:
      xtdpdgmm ..., model(fod) gmm(l.(gini_disp EFW ln_Income ln_pl_i fyr_sch_sec myr_sch_sec), lag(1 .) collapse)
      are not equivalent. To make the two equivalent, you either need to specify laglimits(2 .) with xtabond2, or lag(0 .) with xtdpdgmm. The coefficient estimates will nevertheless still not coincide because of the bug in xtabond2 that you mentioned.
      I see thanks - i presume changing xtdpdgmm with (0 .) and leaving xtabond2 unchanged at (1 .) takes the first lag of endogenous variables and doesnt solve the endogeneity issue. In contrast, changing xtabond2 with (2 .) and leaving xtdpdgmm unchanged at (1 .) takes second lags of endogenous variables and hence avoids the endogeneity issue?

      Comment


      • #33
        I a variable is endogenous, i.e. contemporaneously correlated with the error term, then xtdpdgmm with lag(0 .) indeed does not solve the endogeneity problem, but lag(1 .) would (assuming no serial correlation of the idiosyncratic error term). For a predetermined (e.g. a lagged dependent variable) or strictly exogenous variable, lag(0 .) would be fine.

        If you assume that gini_disp is endogenous such that L.gini_disp is predetermined, you could thus use lag(0 .) in your above specifications. If L.gini_disp itself is endogenous, you need to use lag(1 .).
        https://www.kripfganz.de/stata/

        Comment


        • #34
          Originally posted by Sebastian Kripfganz View Post
          I a variable is endogenous, i.e. contemporaneously correlated with the error term, then xtdpdgmm with lag(0 .) indeed does not solve the endogeneity problem, but lag(1 .) would (assuming no serial correlation of the idiosyncratic error term). For a predetermined (e.g. a lagged dependent variable) or strictly exogenous variable, lag(0 .) would be fine.

          If you assume that gini_disp is endogenous such that L.gini_disp is predetermined, you could thus use lag(0 .) in your above specifications. If L.gini_disp itself is endogenous, you need to use lag(1 .).
          Ah okay thanks - in this case income is an endogenous lagged variable as is assumed in the inequality-growth literature. Is the level (0 0) still taking first levels though or for first levels should it be (1 1) for both the xtdpdgmm and xtabond2?

          Originally posted by Sebastian Kripfganz View Post
          The test results do not reject the model specification although the Hansen test p-value is not very comfortable.

          Typically, in the system-GMM literature you would only use the first lag (not the first and second) for the equation in levels, and potentially further lags for the equation in first differences, e.g.
          Code:
          xtabond2 gdpgr L.ineq L.lngdp L.fseced L.mseced L.pli i.t, ///
          gmmstyle(L.(lngdp ineq fseced mseced pli), equation(diff) laglimits(1 2) collapse) ///
          gmmstyle(L.(lngdp ineq fseced mseced pli), equation(level) laglimits(0 0) collapse) ivstyle(i.t, equation(level)) robust
          That said, your specification is not necessarily problematic. It is just unconventional.
          For example, from the quoted post above, it looks like each variable is assumed as endogenous yet lags are specified as (1 2). Is this because it is first differences used and hence if it were forward orthogonal deviations, then (2 3) would have to be used per our discussion?
          Last edited by Tegh Summy; 23 Feb 2020, 13:15.

          Comment


          • #35
            Originally posted by Sebastian Kripfganz View Post
            I a variable is endogenous, i.e. contemporaneously correlated with the error term, then xtdpdgmm with lag(0 .) indeed does not solve the endogeneity problem, but lag(1 .) would (assuming no serial correlation of the idiosyncratic error term). For a predetermined (e.g. a lagged dependent variable) or strictly exogenous variable, lag(0 .) would be fine.

            If you assume that gini_disp is endogenous such that L.gini_disp is predetermined, you could thus use lag(0 .) in your above specifications. If L.gini_disp itself is endogenous, you need to use lag(1 .).
            In your 2019 presentation, it says to treat lagged dependent variables in the same way as endogenous variables regarding start time period in the command on slide 67 (t=1 for both). But here you mention the lagged dependent variable you should use t=0. I thought it was the former, not the latter?

            Comment


            • #36
              Originally posted by Tegh Summy View Post
              Ah okay thanks - in this case income is an endogenous lagged variable as is assumed in the inequality-growth literature. Is the level (0 0) still taking first levels though or for first levels should it be (1 1) for both the xtdpdgmm and xtabond2?
              Not sure what you mean by "first levels". With xtdpdgmm, what you specify is exactly what you get.

              Originally posted by Tegh Summy View Post
              For example, from the quoted post above, it looks like each variable is assumed as endogenous yet lags are specified as (1 2). Is this because it is first differences used and hence if it were forward orthogonal deviations, then (2 3) would have to be used per our discussion?
              This might be confusing here again because the variable list itself is specified with the lag operator. If those variables (before taking the lag) are endogenous, then after taking lags they are predetermined. For such predetermined variables, lag(1 2) is a valid specification for the instruments in the first-differenced model. For forward-orthogonal deviations, lag(0 1) would be valid for such predetermined variables.

              Originally posted by Tegh Summy View Post
              In your 2019 presentation, it says to treat lagged dependent variables in the same way as endogenous variables regarding start time period in the command on slide 67 (t=1 for both). But here you mention the lagged dependent variable you should use t=0. I thought it was the former, not the latter?
              Slide 67 treats the dependent variable in the same way as endogenous regressors. As a consequence, the lagged dependent variable will be treated as predetermined.
              https://www.kripfganz.de/stata/

              Comment


              • #37
                Originally posted by Sebastian Kripfganz View Post
                Not sure what you mean by "first levels". With xtdpdgmm, what you specify is exactly what you get.


                This might be confusing here again because the variable list itself is specified with the lag operator. If those variables (before taking the lag) are endogenous, then after taking lags they are predetermined. For such predetermined variables, lag(1 2) is a valid specification for the instruments in the first-differenced model. For forward-orthogonal deviations, lag(0 1) would be valid for such predetermined variables.


                Slide 67 treats the dependent variable in the same way as endogenous regressors. As a consequence, the lagged dependent variable will be treated as predetermined.
                Okay so, if I am treating gini_disp as endogenous, and hence L.gini_disp as predetermined, and the lagged dependent variable is predetermined, then the code is different for xtabond2 and xtdpdgmm under FOD in that the lags would have to be e.g. (1 3) for xtabond2 predetermined variables, but (0 2) for the same thing but with xtdpdgmm. But under first differences, both xtabond2 and xtdpdgmm would treat predetermines variables with (1 3)? :

                Code:
                 
                 xtabond2 growth L.gini_disp L.EFW L.ln_Income L.ln_pl_i L.fyr_sch_sec L.myr_sch_sec, orthogonal gmmstyle(l.(gini_disp EFW ln_Income ln_pl_i fyr_sch_sec myr_sch_sec), laglimits(1 3) collapse equation(diff))  gmmstyle(l.(gini_disp EFW ln_Income ln_pl_i fyr_sch_sec myr_sch_sec), laglimits(0 0) collapse equation(level))
                Code:
                 
                 xtdpdgmm growth L.gini_disp L.EFW L.ln_Income L.ln_pl_i L.fyr_sch_sec L.myr_sch_sec, model(fod) gmm(l.(gini_disp EFW ln_Income ln_pl_i fyr_sch_sec myr_sch_sec), lag(0 2) collapse) gmm(l.(gini_disp EFW ln_Income ln_pl_i fyr_sch_sec myr_sch_sec), lag(0 0) collapse diff model(level))

                Comment


                • #38
                  That is correct.

                  Leaving aside the particular Stata programs: From an econometric perspective, it is in the nature of the different transformations that (for a predetermined variable) lag 0 is the first valid lag for FOD while lag 1 is the first valid lag for first differences.
                  https://www.kripfganz.de/stata/

                  Comment


                  • #39
                    Dear Sebastian,

                    I have just developed a model specification including interaction term between two explanatory variables. The model passes all specification tests. However I am confused about the interpretation of coefficients because of interaction term and different lags. Could you please help me to interpret the coefficients of ESGSCORE (which is a measure of sustainability performane of the firm) and OverallScore (which is a measure of economic freedom of the firm's country) and interaction term.

                    Code:
                    xtdpdgmm L(0/1).TOBINSQ_w  L(0/3).( ESGSCORE ) SIZE_w ROA_w  LEV_w CAPEXSALES_w L(0/2).OverallScore c.ESGSCORE#c.OverallScore i.ICBIC, model(fod) collapse gmm( TOBINSQ_w  , lag(1 .)) gmm( ESGSCORE , lag(1 .)) gmm( SIZE_w  , lag(1 .)) gmm( LEV_w  , lag(1.)) gmm( ROA_w  , lag(1 .)) gmm( CAPEXSALES_w  , lag(1 .)) gmm( OverallScore  , lag(1 .)) gmm(ESGSCORE SIZE_w LEV_w ROA_w CAPEXSALES_w OverallScore c.ESGSCORE#c.OverallScore, lag(0 0)) iv(i.ICBIC, model(level)) teffects two vce(r) overid
                     
                    Generalized method of moments estimation
                     
                    Fitting full model:
                    Step 1         f(b) =  .01013173
                    Step 2         f(b) =  .10142921
                     
                    Fitting reduced model 1:
                    Step 1         f(b) =  .07740627
                     
                    Fitting reduced model 2:
                    Step 1         f(b) =  .09445782
                     
                    Fitting reduced model 3:
                    Step 1         f(b) =  .08429092
                     
                    Fitting reduced model 4:
                    Step 1         f(b) =  .08862122
                     
                    Fitting reduced model 5:
                    Step 1         f(b) =  .07572473
                     
                    Fitting reduced model 6:
                    Step 1         f(b) =  .08666812
                     
                    Fitting reduced model 7:
                    Step 1         f(b) =   .0861233
                     
                    Fitting reduced model 8:
                    Step 1         f(b) =  .08308427
                     
                    Fitting reduced model 9:
                    Step 1         f(b) =  .08920645
                     
                    Fitting reduced model 10:
                    Step 1         f(b) =  .08920645
                     
                    Fitting no-level model:
                    Step 1         f(b) =  .08920645
                     
                    Group variable: ID                           Number of obs         =      2147
                    Time variable: YEAR                          Number of groups      =       440
                     
                    Moment conditions:     linear =      80      Obs per group:    min =         1
                                        nonlinear =       0                        avg =  4.879545
                                            total =      80                        max =         7
                     
                                                                    (Std. Err. adjusted for 440 clusters in ID)
                    -------------------------------------------------------------------------------------------
                                              |              WC-Robust
                                    TOBINSQ_w |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                    --------------------------+----------------------------------------------------------------
                                    TOBINSQ_w |
                                          L1. |   .6984193   .0654179    10.68   0.000     .5702027     .826636
                                              |
                                     ESGSCORE |
                                          --. |   .1128105   .0421064     2.68   0.007     .0302835    .1953376
                                          L1. |   .0004991   .0014639     0.34   0.733    -.0023702    .0033683
                                          L2. |   .0005379   .0013991     0.38   0.701    -.0022043    .0032801
                                          L3. |  -.0018574   .0011518    -1.61   0.107    -.0041149    .0004001
                                              |
                                       SIZE_w |  -.0847096   .0469912    -1.80   0.071    -.1768107    .0073915
                                        ROA_w |   .0210984   .0063408     3.33   0.001     .0086706    .0335261
                                        LEV_w |   .2967615   .4005586     0.74   0.459    -.4883189    1.081842
                                 CAPEXSALES_w |  -.0094638   .0038115    -2.48   0.013    -.0169342   -.0019934
                                              |
                                 OverallScore |
                                          --. |   .1059354   .0452059     2.34   0.019     .0173335    .1945373
                                          L1. |  -.0030094   .0069359    -0.43   0.664    -.0166035    .0105848
                                          L2. |  -.0535394   .0147168    -3.64   0.000    -.0823839   -.0246949
                                              |
                    c.ESGSCORE#c.OverallScore |  -.0021031   .0007813    -2.69   0.007    -.0036344   -.0005718
                                              |
                                        ICBIC |
                                          15  |  -.0685422    .258174    -0.27   0.791     -.574554    .4374695
                                          20  |  -.1219692   .2260116    -0.54   0.589    -.5649439    .3210054
                                          30  |  -.1223279   .3039111    -0.40   0.687    -.7179827    .4733269
                                          35  |  -.2328229    .282328    -0.82   0.410    -.7861757    .3205298
                                          40  |  -.0843717   .2157424    -0.39   0.696     -.507219    .3384757
                                          45  |   .1119753    .209816     0.53   0.594    -.2992564     .523207
                                          50  |  -.2074905    .261164    -0.79   0.427    -.7193624    .3043815
                                          55  |   -.013833   .2326584    -0.06   0.953    -.4698351    .4421692
                                          60  |  -.2676219   .2424246    -1.10   0.270    -.7427655    .2075217
                                          65  |   -.293426   .2462262    -1.19   0.233    -.7760206    .1891685
                                              |
                                         YEAR |
                                        2013  |   .0290727   .0261003     1.11   0.265    -.0220829    .0802284
                                        2014  |   .1111872   .0295596     3.76   0.000     .0532516    .1691229
                                        2015  |   .0811373   .0320161     2.53   0.011      .018387    .1438877
                                        2016  |    .104873   .0394908     2.66   0.008     .0274724    .1822737
                                        2017  |   .1532381   .0412709     3.71   0.000     .0723487    .2341276
                                        2018  |    .046619   .0427592     1.09   0.276    -.0371875    .1304255
                                              |
                                        _cons |  -.8009295   2.118316    -0.38   0.705    -4.952753    3.350894
                    -------------------------------------------------------------------------------------------
                    Instruments corresponding to the linear moment conditions:
                     1, model(fodev):
                       L1.TOBINSQ_w L2.TOBINSQ_w L3.TOBINSQ_w L4.TOBINSQ_w L5.TOBINSQ_w
                       L6.TOBINSQ_w L7.TOBINSQ_w L8.TOBINSQ_w
                     2, model(fodev):
                       L1.ESGSCORE L2.ESGSCORE L3.ESGSCORE L4.ESGSCORE L5.ESGSCORE L6.ESGSCORE
                       L7.ESGSCORE L8.ESGSCORE
                     3, model(fodev):
                       L1.SIZE_w L2.SIZE_w L3.SIZE_w L4.SIZE_w L5.SIZE_w L6.SIZE_w L7.SIZE_w
                       L8.SIZE_w
                     4, model(fodev):
                       L1.LEV_w L2.LEV_w L3.LEV_w L4.LEV_w L5.LEV_w L6.LEV_w L7.LEV_w L8.LEV_w
                     5, model(fodev):
                       L1.ROA_w L2.ROA_w L3.ROA_w L4.ROA_w L5.ROA_w L6.ROA_w L7.ROA_w L8.ROA_w
                     6, model(fodev):
                       L1.CAPEXSALES_w L2.CAPEXSALES_w L3.CAPEXSALES_w L4.CAPEXSALES_w
                       L5.CAPEXSALES_w L6.CAPEXSALES_w L7.CAPEXSALES_w L8.CAPEXSALES_w
                     7, model(fodev):
                       L1.OverallScore L2.OverallScore L3.OverallScore L4.OverallScore
                       L5.OverallScore L6.OverallScore L7.OverallScore L8.OverallScore
                     8, model(fodev):
                       ESGSCORE SIZE_w LEV_w ROA_w CAPEXSALES_w OverallScore
                       c.ESGSCORE#c.OverallScore
                     9, model(level):
                       15bn.ICBIC 20.ICBIC 30.ICBIC 35.ICBIC 40.ICBIC 45.ICBIC 50.ICBIC 55.ICBIC
                       60.ICBIC 65.ICBIC
                     10, model(level):
                       2013bn.YEAR 2014.YEAR 2015.YEAR 2016.YEAR 2017.YEAR 2018.YEAR
                     11, model(level):
                       _cons
                     
                    . estat serial, ar(1/3)
                     
                    Arellano-Bond test for autocorrelation of the first-differenced residuals
                    H0: no autocorrelation of order 1:     z =   -4.8072   Prob > |z|  =    0.0000
                    H0: no autocorrelation of order 2:     z =   -0.1908   Prob > |z|  =    0.8487
                    H0: no autocorrelation of order 3:     z =   -0.0397   Prob > |z|  =    0.9683
                     
                    . estat overid
                     
                    Sargan-Hansen test of the overidentifying restrictions
                    H0: overidentifying restrictions are valid
                     
                    2-step moment functions, 2-step weighting matrix       chi2(50)    =   44.6289
                                                                           Prob > chi2 =    0.6880
                     
                    2-step moment functions, 3-step weighting matrix       chi2(50)    =   51.6707
                                                                           Prob > chi2 =    0.4084
                     
                    . 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) |    34.0588     42    0.8034 |     10.5701      8    0.2273
                      2, model(fodev) |    41.5614     42    0.4901 |      3.0674      8    0.9301
                      3, model(fodev) |    37.0880     42    0.6861 |      7.5408      8    0.4796
                      4, model(fodev) |    38.9933     42    0.6037 |      5.6355      8    0.6880
                      5, model(fodev) |    33.3189     42    0.8283 |     11.3100      8    0.1847
                      6, model(fodev) |    38.1340     42    0.6414 |      6.4949      8    0.5920
                      7, model(fodev) |    37.8943     42    0.6517 |      6.7346      8    0.5655
                      8, model(fodev) |    36.5571     43    0.7454 |      8.0718      7    0.3263
                      9, model(level) |    39.2508     44    0.6751 |      5.3780      6    0.4963
                     10, model(level) |    39.2508     44    0.6751 |      5.3780      6    0.4963
                         model(fodev) |          .    -13         . |           .      .         .
                         model(level) |    39.2508     34    0.2462 |      5.3780     16    0.9935

                    Comment


                    • #40
                      The interpretation works in the same way as with interaction effects in any other linear regression model:
                      Assuming both scores are positive, the negative interaction effect means that the positive effect of either score is attenuated, more so the larger the respective other score is.

                      Ideally, you would want to compute marginal effects. The xtdpdgmm command does not yet support the margins command for that purpose.
                      https://www.kripfganz.de/stata/

                      Comment


                      • #41
                        Thank you Sebastian

                        Comment


                        • #42
                          Dear Sebastian,

                          Could you please check whether these two codes are equilavent? I know the coefficients will not be the same due to the bug in xtabond2, I am only interested with the equality in terms of sytanxes.

                          Code:
                          xtabond2 L(0/1).TOBINSQ_w  L(0/3).( ESGSCORE ) SIZE_w ROA_w  LEV_w CAPEXSALES_w ICBIC2 ICBIC3 ICBIC4 ICBIC5 ICBIC6 ICBIC7 ICBIC8 ICBIC9 ICBIC10 ICBIC11 YEAR5 YEAR6 YEAR7 YEAR8 YEAR9 YEAR10 , gmm(TOBINSQ_w,lag(2 .) collapse) gmm (ESGSCORE SIZE_w ROA_w  LEV_w CAPEXSALES_w, lag(1  .) collapse) iv(ICBIC2 ICBIC3 ICBIC4 ICBIC5 ICBIC6 ICBIC7 ICBIC8 ICBIC9 ICBIC10 ICBIC11 YEAR5 YEAR6 YEAR7 YEAR8 YEAR9 YEAR10, equation(leve l)) twostep robust orthogonal
                          Code:
                          xtdpdgmm L(0/1).TOBINSQ_w  L(0/3).( ESGSCORE ) SIZE_w ROA_w  LEV_w CAPEXSALES_w i.ICBIC, model(fod) collapse gmm( TOBINSQ_w  , lag(1 .)) gmm( ESGSCORE , lag(1 .)) gmm( SIZE_w  , lag(1 .)) gmm( LEV_w  , lag(1 .)) gmm( ROA_w  , lag(1 .)) gmm( CAPEXSALES_w  , lag(1 .)) gmm(ESGSCORE SIZE_w LEV_w ROA_w CAPEXSALES_w , lag(0 0)) iv(i.ICBIC, model(level)) teffects two vce(r) overid

                          Comment


                          • #43
                            As far as I can see, the two specifications look equivalent, yes.
                            https://www.kripfganz.de/stata/

                            Comment


                            • #44
                              Originally posted by Sebastian Kripfganz View Post
                              The underid command is not an official Stata command. It seems that it is not yet publicly released by its author. So, I am afraid you cannot yet use it.
                              Is there any built-in command to test for whether instruments using the differences equation or the level equation are weak instruments for each individual independent variable? I'd like to test whether a reduced form equation with d.l.X1 on l2.X1 (first differences) or l.X1 on d.l.X1 (levels) are weak instruments. This can be done using 2sls in stata, but wondered if anything is was an update available in xtdpdgmm command wise which conducts this test already.

                              Comment


                              • #45
                                There is no such test yet available directly within the xtdpdgmm package. Sorry.
                                https://www.kripfganz.de/stata/

                                Comment

                                Working...
                                X