Announcement

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

  • Dear professor Sebastian Kripfganz
    I hope you are well today
    Always thank you for your clear answer
    This time I have three question as followings
    1.First Q
    In your London presentation(2019)p.31 you tald that "In combination with the moment conditions for the differenced model, further lags for the level model are redundant" with roodman(2009), and Arellano and Bover(1995)
    Here what is the exact meaning of redundant? does it mean that we do not need to include higher order lags or must not use higer lags additionally ?

    2.Second Q
    another question is if higher order lags are redundant and it is better to use only one moment contion then instead of using the first zero lag can we use higher lag one. in case of predetermined variable

    3. Third Q
    Last, if higher lags are redundant, then why including the higer lags affect the estimation results


    The folliwings are three case
    1.using only first differenced instrument in level equation :gmm(n, lag(1 1) diff model(level))
    xtdpdgmm L(0/1).n w k, model(diff) collapse gmm(n, lag(2 4)) gmm(w k, lag(1 3)) gmm(n, lag(1 1) diff model(level)) gmm(w k, lag(0 0) diff model(level)) two vce(r) // p.36

    ------------------------------------------------------------------------------
    | WC-Robust
    n | Coefficient std. err. z P>|z| [95% conf. interval]
    -------------+----------------------------------------------------------------
    n |
    L1. | .5117523 .1208484 4.23 0.000 .2748937 .7486109
    |
    w | -1.323125 .2383451 -5.55 0.000 -1.790273 -.855977
    k | .1931365 .0941343 2.05 0.040 .0086367 .3776363
    _cons | 4.698425 .7943584 5.91 0.000 3.141511 6.255339
    ------------------------------------------------------------------------------

    2.including higher lagged differenced instruments in level equation :gmm(n, lag(1 3) diff model(level))
    xtdpdgmm L(0/1).n w k, model(diff) collapse gmm(n, lag(2 4)) gmm(w k, lag(1 3)) gmm(n, lag(1 3) diff model(level)) gmm(w k, lag(0 0) diff model(level)) two vce(r) // p.36

    ------------------------------------------------------------------------------
    | WC-Robust
    n | Coefficient std. err. z P>|z| [95% conf. interval]
    -------------+----------------------------------------------------------------
    n |
    L1. | .4951825 .0955246 5.18 0.000 .3079577 .6824073
    |
    w | -1.2974 .192342 -6.75 0.000 -1.674383 -.9204167
    k | .2078625 .0951428 2.18 0.029 .0213861 .394339
    _cons | 4.649591 .5885837 7.90 0.000 3.495989 5.803194
    ------------------------------------------------------------------------------


    ​​​​​​​3.Replacing with higher lagged differenced instruments in level equation :gmm(n, lag(3 3) diff model(level))
    xtdpdgmm L(0/1).n w k, model(diff) collapse gmm(n, lag(2 4)) gmm(w k, lag(1 3)) gmm(n, lag(3 3) diff model(level)) gmm(w k, lag(0 0) diff model(level)) two vce(r) // p.36

    ------------------------------------------------------------------------------
    | WC-Robust
    n | Coefficient std. err. z P>|z| [95% conf. interval]
    -------------+----------------------------------------------------------------
    n |
    L1. | .4765705 .0994517 4.79 0.000 .2816488 .6714922
    |
    w | -1.412922 .2631131 -5.37 0.000 -1.928614 -.8972297
    k | .1916385 .1015619 1.89 0.059 -.0074192 .3906962
    _cons | 5.016399 .8148121 6.16 0.000 3.419396 6.613401
    ------------------------------------------------------------------------------

    Thank you so much again!!!

    Comment


      1. Redundant means that these instruments are perfectly collinear with the already included instruments. Therefore, you do not need to include them because they would be dropped during the estimation anyway (just as any estimation command drops regressors which are perfectly collinear with others). However, strictly speaking, these additional lagged instruments for the level model are only redundant if ALL lags for the first-differenced model are used WITHOUT collapsing (and with balanced panel data). As soon as you collapse the instruments or limit their lag order, there is a good chance that the extra lags for the level model are no longer redundant, and therefore could be used in the estimation.
      2. Yes, that would exactly be the recommended approach.
      3. In your example, the higher-order lags are not strictly redundant because the lag limit for the first-differenced model is restricted to 3 and the instruments are also collapsed.
      Here is an example of that redundancy, where adding the first lag of the instruments for the model in level neither changes the number of instruments actually used nor the estimation results:
      Code:
      . webuse psidextract
      
      . xtdpdgmm L(0/1).lwage wks, gmm(L.lwage wks, l(1 .) m(d)) gmm(L.lwage wks, d l(0 0)) vce(r)
      
      Generalized method of moments estimation
      
      Fitting full model:
      Step 1         f(b) =  .02160153
      
      Group variable: id                           Number of obs         =      3570
      Time variable: t                             Number of groups      =       595
      
      Moment conditions:     linear =      47      Obs per group:    min =         6
                          nonlinear =       0                        avg =         6
                              total =      47                        max =         6
      
                                         (Std. err. adjusted for 595 clusters in id)
      ------------------------------------------------------------------------------
                   |               Robust
             lwage | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
      -------------+----------------------------------------------------------------
             lwage |
               L1. |   .8324395   .0321538    25.89   0.000     .7694192    .8954597
                   |
               wks |  -.0000475   .0014533    -0.03   0.974     -.002896    .0028009
             _cons |   1.209187   .2559019     4.73   0.000     .7076281    1.710745
      ------------------------------------------------------------------------------
      Instruments corresponding to the linear moment conditions:
       1, model(diff):
         3:L1.L.lwage 4:L1.L.lwage 5:L1.L.lwage 6:L1.L.lwage 7:L1.L.lwage
         4:L2.L.lwage 5:L2.L.lwage 6:L2.L.lwage 7:L2.L.lwage 5:L3.L.lwage
         6:L3.L.lwage 7:L3.L.lwage 6:L4.L.lwage 7:L4.L.lwage 7:L5.L.lwage 3:L1.wks
         4:L1.wks 5:L1.wks 6:L1.wks 7:L1.wks 3:L2.wks 4:L2.wks 5:L2.wks 6:L2.wks
         7:L2.wks 4:L3.wks 5:L3.wks 6:L3.wks 7:L3.wks 5:L4.wks 6:L4.wks 7:L4.wks
         6:L5.wks 7:L5.wks 7:L6.wks
       2, model(level):
         3:D.L.lwage 4:D.L.lwage 5:D.L.lwage 6:D.L.lwage 7:D.L.lwage 2:D.wks 3:D.wks
         4:D.wks 5:D.wks 6:D.wks 7:D.wks
       3, model(level):
         _cons
      
      . xtdpdgmm L(0/1).lwage wks, gmm(L.lwage wks, l(1 .) m(d)) gmm(L.lwage wks, d l(0 1)) vce(r)
      
      Generalized method of moments estimation
      
      Fitting full model:
      Step 1         f(b) =  .02160153
      
      Group variable: id                           Number of obs         =      3570
      Time variable: t                             Number of groups      =       595
      
      Moment conditions:     linear =      47      Obs per group:    min =         6
                          nonlinear =       0                        avg =         6
                              total =      47                        max =         6
      
                                         (Std. err. adjusted for 595 clusters in id)
      ------------------------------------------------------------------------------
                   |               Robust
             lwage | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
      -------------+----------------------------------------------------------------
             lwage |
               L1. |   .8324395   .0321538    25.89   0.000     .7694192    .8954597
                   |
               wks |  -.0000475   .0014533    -0.03   0.974     -.002896    .0028009
             _cons |   1.209187   .2559019     4.73   0.000     .7076281    1.710745
      ------------------------------------------------------------------------------
      Instruments corresponding to the linear moment conditions:
       1, model(diff):
         3:L1.L.lwage 4:L1.L.lwage 5:L1.L.lwage 6:L1.L.lwage 7:L1.L.lwage
         4:L2.L.lwage 5:L2.L.lwage 6:L2.L.lwage 7:L2.L.lwage 5:L3.L.lwage
         6:L3.L.lwage 7:L3.L.lwage 6:L4.L.lwage 7:L4.L.lwage 7:L5.L.lwage 3:L1.wks
         4:L1.wks 5:L1.wks 6:L1.wks 7:L1.wks 3:L2.wks 4:L2.wks 5:L2.wks 6:L2.wks
         7:L2.wks 4:L3.wks 5:L3.wks 6:L3.wks 7:L3.wks 5:L4.wks 6:L4.wks 7:L4.wks
         6:L5.wks 7:L5.wks 7:L6.wks
       2, model(level):
         3:D.L.lwage 5:D.L.lwage 6:D.L.lwage 7:D.L.lwage 5:L1.D.L.lwage 2:D.wks
         4:D.wks 6:D.wks 7:D.wks 4:L1.D.wks 6:L1.D.wks
       3, model(level):
         _cons
      https://twitter.com/Kripfganz

      Comment


      • Thank you very much Sebastian Kripfganz
        and sorry about my misnumbering
        2.Second Q corresponds to 3.Replacing with higher lagged
        and
        3. Third Q corresponds to 2.including higher lagged differenced instruments
        ​​​​​​​
        Anyway I clearly understand what redundant means
        Thanks lot again!

        Comment


        • Dear professor Kripfganz,

          Regarding difference-in-Hansen test after xtdpdgmm estimation, may I ask two questions please:

          1) If moment conditions for just one variable in model(level) do not pass the test, is it ok not to use instruments for model(level) just for that variable? Do reviewers see this as a cherry-picking or is it legit?

          2) estat overid, difference gave me the following output:
          Click image for larger version

Name:	diff-in-Hansen.png
Views:	1
Size:	33.1 KB
ID:	1713710


          Is it ok to report overall Hansen test + p-values circled in red (since these test the Blundell-Bond assumption, if my understading is correct)?

          I am asking this since I've got a lot of models to report, but cannot figure out how to extract the diff-in-Hansen test in a table to word document. Any suggestions here?

          3) For the purpose of testing robustness of dynamic panel data SYS-GMM estimation, what of the following do you suggest: a) comparing twostep and igmm estimations; b) using another (similar) dependent variable; c) reporting FE and OLS estimations; d) something else?

          Comment


          • Dear professor Kripfganz
            I am trying to measure the rate of return to R&D , so I build a model dyanmic panel data model
            dlntfp(firm performance) = L.dlntfp + L.dlnrnd(firm RnD investment) + L.dinvest(firm physical invest) + L.dlnrcapital(firm captal sotck) + i.type_num(firm tipe)
            I first implemented model(fod) collapse nolevel and second stage I added the level equation
            then at the second stage the excluding differenc hansen test value changed form insignificant to significant
            what does this phenomina happen?
            If the results of difference gmm does not satisfy anyone of test(Arellano-Bond test for autocorrelation of the first-differenced residuals, Sargan-Hansen test of the overidentifying restrictions ,Sargan-Hansen (difference) test of the overidentifying restrictions) then can't we move to sys-gmm.
            Thanks lot!



            1. only model(fod) not level equation

            . xi:xtdpdgmm L(0/1).dlntfp L(1/1).dlnrnd L(1/1).dinvest L(1/1).dlnrcapital i.type_num , model(fod
            > ) collapse iv( i.type ) gmmiv(L.dlntfp, lag(1 3 ) ) gmmiv(L.dlnrnd, lag(1 3 )) gmmiv(L.dinvest,
            > lag(1 3 )) gmmiv(L.dlnrcapital,lag(1 3 )) vce(robust) teffects overid two
            i.type_num _Itype_num_1-4 (naturally coded; _Itype_num_1 omitted)
            i.type _Itypea1-4 (_Itypea1 for type==대기업 omitted)

            Generalized method of moments estimation


            Group variable: firmid Number of obs = 5690
            Time variable: year Number of groups = 815

            Moment conditions: linear = 22 Obs per group: min = 4
            nonlinear = 0 avg = 6.981595
            total = 22 max = 7

            (Std. err. adjusted for 815 clusters in firmid)
            ------------------------------------------------------------------------------
            | WC-Robust
            dlntfp | Coefficient std. err. z P>|z| [95% conf. interval]
            -------------+----------------------------------------------------------------
            dlntfp |
            L1. | .2366397 .1872553 1.26 0.206 -.130374 .6036533
            |
            dlnrnd |
            L1. | -.0956772 .0571342 -1.67 0.094 -.2076581 .0163037
            |
            dinvest |
            L1. | .0007188 .0010524 0.68 0.495 -.0013438 .0027815
            |
            dlnrcapital |
            L1. | -.0430342 .0297595 -1.45 0.148 -.1013618 .0152934
            |
            _Itype_num_2 | .0423446 .1142619 0.37 0.711 -.1816045 .2662937
            _Itype_num_3 | .0406287 .0307536 1.32 0.186 -.0196472 .1009046
            _Itype_num_4 | .087836 .0908781 0.97 0.334 -.0902819 .2659538
            |
            year |
            2016 | -.0333049 .0093917 -3.55 0.000 -.0517122 -.0148976
            2017 | -.0495779 .0079012 -6.27 0.000 -.065064 -.0340919
            2018 | -.0027143 .0064672 -0.42 0.675 -.0153898 .0099612
            2019 | -.0495071 .0129707 -3.82 0.000 -.0749292 -.024085
            2020 | .0116514 .009511 1.23 0.221 -.0069897 .0302926
            2021 | -.054457 .0174896 -3.11 0.002 -.0887359 -.0201781
            |
            _cons | -.0319817 .1018606 -0.31 0.754 -.2316247 .1676614
            ------------------------------------------------------------------------------
            Instruments corresponding to the linear moment conditions:
            1, model(fodev):
            L1.L.dlntfp L2.L.dlntfp L3.L.dlntfp
            2, model(fodev):
            L1.L.dlnrnd L2.L.dlnrnd L3.L.dlnrnd
            3, model(fodev):
            L1.L.dinvest L2.L.dinvest L3.L.dinvest
            4, model(fodev):
            L1.L.dlnrcapital L2.L.dlnrcapital L3.L.dlnrcapital
            5, model(fodev):
            _Itypea2 _Itypea3 _Itypea4
            6, model(level):
            2016bn.year 2017.year 2018.year 2019.year 2020.year 2021.year
            7, 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 = -2.6375 Prob > |z| = 0.0084
            H0: no autocorrelation of order 2 z = -0.5151 Prob > |z| = 0.6065
            H0: no autocorrelation of order 3 z = 0.4108 Prob > |z| = 0.6812

            . estat overid

            Sargan-Hansen test of the overidentifying restrictions
            H0: overidentifying restrictions are valid

            2-step moment functions, 2-step weighting matrix chi2(8) = 9.4444
            Prob > chi2 = 0.3062

            2-step moment functions, 3-step weighting matrix chi2(8) = 11.7550
            Prob > chi2 = 0.1625

            . 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) | 6.0013 5 0.3061 | 3.4431 3 0.3282
            2, model(fodev) | 7.4374 5 0.1901 | 2.0070 3 0.5709
            3, model(fodev) | 6.1205 5 0.2947 | 3.3239 3 0.3443
            4, model(fodev) | 5.8152 5 0.3246 | 3.6292 3 0.3044
            5, model(fodev) | 8.3917 5 0.1359 | 1.0527 3 0.7885
            6, model(level) | 4.0922 2 0.1292 | 5.3523 6 0.4995
            model(fodev) | . -7 . | . . .




            2. adding sys-gmm

            . xtdpdgmm L(0/1).dlntfp L(1/1).dlnrnd L(1/1).dinvest L(1/1).dlnrcapital i.type_num , model(fod) collapse gmmiv(L.dlntfp, lag(1 . ) )
            >gmmiv(L.dlnrnd, lag(1 . )) gmmiv(L.dinvest, lag(1 . )) gmm
            > iv(L.dlnrcapital,lag(1 . )) gmmiv(L.dlntfp, model(l)lag(0 0) ) gmmiv(L.dlnrnd, model(l)lag(0 0))
            > gmmiv(L.dinvest, model(l)lag(0 0)) gmmiv(L.dlnrcapital,model(l)lag(0 0)) iv( i.type ,model(l) )
            > vce(robust) teffects overid
            i.type_num _Itype_num_1-4 (naturally coded; _Itype_num_1 omitted)
            i.type _Itypea1-4 (_Itypea1 for type==대기업 omitted)

            Generalized method of moments estimation



            Group variable: firmid Number of obs = 5690
            Time variable: year Number of groups = 815

            Moment conditions: linear = 34 Obs per group: min = 4
            nonlinear = 0 avg = 6.981595
            total = 34 max = 7

            (Std. err. adjusted for 815 clusters in firmid)
            ------------------------------------------------------------------------------
            | Robust
            dlntfp | Coefficient std. err. z P>|z| [95% conf. interval]
            -------------+----------------------------------------------------------------
            dlntfp |
            L1. | .6732203 .0246499 27.31 0.000 .6249074 .7215332
            |
            dlnrnd |
            L1. | .0140929 .0018071 7.80 0.000 .0105511 .0176346
            |
            dinvest |
            L1. | 5.76e-06 7.07e-06 0.82 0.415 -8.10e-06 .0000196
            |
            dlnrcapital |
            L1. | -.0123889 .0017524 -7.07 0.000 -.0158236 -.0089542
            |
            _Itype_num_2 | -.0007039 .0083043 -0.08 0.932 -.0169801 .0155723
            _Itype_num_3 | .0167453 .0080707 2.07 0.038 .000927 .0325635
            _Itype_num_4 | .0119466 .0081141 1.47 0.141 -.0039568 .0278499
            |
            year |
            2016 | -.0458018 .005804 -7.89 0.000 -.0571774 -.0344262
            2017 | -.0513295 .0055171 -9.30 0.000 -.0621428 -.0405162
            2018 | .0014926 .0048898 0.31 0.760 -.0080912 .0110764
            2019 | -.0680147 .0056909 -11.95 0.000 -.0791686 -.0568607
            2020 | .0193935 .0058651 3.31 0.001 .0078981 .0308889
            2021 | -.0765423 .0055467 -13.80 0.000 -.0874137 -.0656709
            |
            _cons | .0185271 .0081254 2.28 0.023 .0026016 .0344526
            ------------------------------------------------------------------------------
            Instruments corresponding to the linear moment conditions:
            1, model(fodev):
            L1.L.dlntfp L2.L.dlntfp L3.L.dlntfp L4.L.dlntfp L5.L.dlntfp
            2, model(fodev):
            L1.L.dlnrnd L2.L.dlnrnd L3.L.dlnrnd L4.L.dlnrnd L5.L.dlnrnd
            3, model(fodev):
            L1.L.dinvest L2.L.dinvest L3.L.dinvest L4.L.dinvest L5.L.dinvest
            4, model(fodev):
            L1.L.dlnrcapital L2.L.dlnrcapital L3.L.dlnrcapital L4.L.dlnrcapital
            L5.L.dlnrcapital
            5, model(level):
            L.dlntfp
            6, model(level):
            L.dlnrnd
            7, model(level):
            L.dinvest
            8, model(level):
            L.dlnrcapital
            9, model(level):
            _Itypea2 _Itypea3 _Itypea4
            10, model(level):
            2016bn.year 2017.year 2018.year 2019.year 2020.year 2021.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 = -10.9716 Prob > |z| = 0.0000
            H0: no autocorrelation of order 2 z = 0.4605 Prob > |z| = 0.6451
            H0: no autocorrelation of order 3 z = 1.2161 Prob > |z| = 0.2239

            . estat overid

            Sargan-Hansen test of the overidentifying restrictions
            H0: overidentifying restrictions are valid

            1-step moment functions, 1-step weighting matrix chi2(20) = 68.5536
            note: * Prob > chi2 = 0.0000

            1-step moment functions, 2-step weighting matrix chi2(20) = 55.3697
            note: * Prob > chi2 = 0.0000

            * asymptotically invalid if the one-step weighting matrix is not optimal

            . estat overid, difference

            Sargan-Hansen (difference) test of the overidentifying restrictions
            H0: (additional) overidentifying restrictions are valid

            1-step weighting matrix from full model
            note: asymptotically invalid if the one-step weighting matrix is not optimal

            | Excluding | Difference
            Moment conditions | chi2 df p | chi2 df p
            ------------------+-----------------------------+-----------------------------
            1, model(fodev) | 56.1563 15 0.0000 | 12.3972 5 0.0297
            2, model(fodev) | 58.8869 15 0.0000 | 9.6666 5 0.0853
            3, model(fodev) | 53.7500 15 0.0000 | 14.8036 5 0.0112
            4, model(fodev) | 62.2399 15 0.0000 | 6.3137 5 0.2769
            5, model(level) | 55.4676 19 0.0000 | 13.0860 1 0.0003
            6, model(level) | 62.7131 19 0.0000 | 5.8405 1 0.0157
            7, model(level) | 61.7584 19 0.0000 | 6.7951 1 0.0091
            8, model(level) | 64.4376 19 0.0000 | 4.1159 1 0.0425
            9, model(level) | 59.0935 17 0.0000 | 9.4600 3 0.0238
            10, model(level) | 56.8654 14 0.0000 | 11.6881 6 0.0693
            model(fodev) | 0.3769 0 . | 68.1766 20 0.0000
            model(level) | 11.5289 7 0.1172 | 57.0247 13 0.0000

            Comment


            • Filip Novinc
              1. If the difference-in-Hansen test fails for one set of instruments, it might be reasonable to just drop this set of instruments and continue with all of the other instruments. You might want to test for potential underidentification problems after dropping a set of instruments using the underid postestimation command.
              2. Which tests you report depends on the message you want to conveye. A good strategy might be to report the overall Hansen test and a single difference-in-Hansen test for all level instruments jointly. If you want to be more specific about different sets of instruments, you can also report all of the individual circled difference-in-Hansen tests.
              3. (a) is a robustness test to potential problems with estimating the optimal weighting matrix; this could be useful. (b) is unclear to me what kind of robustness you are assessing; depends on your research question. (c) it is not sure what you will achieve with these comparisons. (d) it might be insightful to check the robustness to different lag lengths for the instruments.

              Mugi Jang
              1. Note that with model(fod), the contemporaneous variables (lag 0) already qualify as instruments (for exogenous and predetermined variables). The test results here look all fine.
              2. It is hard to say what is going on here. You might want to try keeping the instruments for the indicator variables for the first-differenced model, at least for testing purposes. You could also try the manual difference-in-Hansen test outlined on slide 49 of my 2019 London Stata Conference presentation; make sure that the smaller model is nested in the larger one!
              https://twitter.com/Kripfganz

              Comment


              • Dear professor Sebastian Kripfganz
                You recommended me to try the manual difference-in-Hansen test outlined on slide 49 of your 2019 London Stata Conference presentation
                So I tried as follows

                *comparison of one and two level equation
                1.nested model
                xtdpdgmm L(0/1).n w k, model(diff) collapse gmm(n, lag(2 4)) gmm(w k, lag(1 3)) gmm(n, lag(1 1)diff model(level)) two vce(r) overid // gmm(w k, lag(0 0) diff model(level)) dropped
                estat overid
                estimates store onelevel

                2.nesting full model
                xtdpdgmm L(0/1).n w k, model(diff) collapse gmm(n, lag(2 4)) gmm(w k, lag(1 3)) gmm(n, lag(1 1) diff model(level)) gmm(w k, lag(0 0) diff model(level)) two vce(r) overid
                estat overid
                estat overid,difference
                estat overid onelevel

                From the 1.nested model the output is as follows
                1, model(diff):
                L2.n L3.n L4.n
                2, model(diff):
                L1.w L2.w L3.w L1.k L2.k L3.k
                3, model(level):
                L1.D.n

                . estat overid

                Sargan-Hansen test of the overidentifying restrictions
                H0: overidentifying restrictions are valid
                2-step moment functions, 2-step weighting matrix chi2(7) = 8.2384
                Prob > chi2 = 0.3120
                2-step moment functions, 3-step weighting matrix chi2(7) = 6.6284
                Prob > chi2 = 0.4686


                From the 2.nesting full model the output is as follows

                1, model(diff):
                L2.n L3.n L4.n
                2, model(diff):
                L1.w L2.w L3.w L1.k L2.k L3.k
                3, model(level):
                L1.D.n
                4, model(level):
                D.w D.k
                5, 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(9) = 16.1962
                Prob > chi2 = 0.0629

                2-step moment functions, 3-step weighting matrix chi2(9) = 13.8077
                Prob > chi2 = 0.1293

                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(diff) | 14.6666 6 0.0230 | 1.5296 3 0.6754
                2, model(diff) | 4.0234 3 0.2590 | 12.1728 6 0.0582
                3, model(level) | 15.8404 8 0.0447 | 0.3558 1 0.5509
                4, model(level) | 12.0861 7 0.0978 | 4.1102 2 0.1281
                model(diff) | 0.0000 0 . | 16.1962 9 0.0629
                model(level) | 8.0920 6 0.2314 | 8.1042 3 0.0439


                Finally I utilized the xtdpdgmm postestimation command estat overid to compute the difference of two nested overidentification test statistics


                estat overid onelevel

                Sargan-Hansen difference test of the overidentifying restrictions
                H0: additional overidentifying restrictions are valid
                2-step moment functions, 2-step weighting matrix chi2(2) = 7.9578
                Prob > chi2 = 0.0187
                2-step moment functions, 3-step weighting matrix chi2(2) = 7.1793
                Prob > chi2 = 0.0276


                Here are my questions
                why does not the values of the last Sargan-Hansen difference test (right above)match to Sargan-Hansen (difference) test of the overidentifying restrictions of nesting model

                7.9578 != 4.1102

                But it matches to the difference value of the two model's Sargan-Hansen test of the overidentifying restrictions


                16.1962 - 8.2384 = 7.9578

                why I can't find this value(7.9578) in the 2.nesting full model's "| Excluding | Difference output" table
                and also after excluding the model 4 the chi2 value of nesting model is 12.0861 not 8.2384 in "| Excluding | Difference output" table

                Thanks lot in advance

                Comment


                • The test statistic produced by your estat overid onelevel command is calculated as the difference of the individual Hansen test statistics from the two models, as you already observed. The right comparison in the output of estat overid, difference would be the very last row, where the difference test statistic is shown as 8.1042. These numbers do not coincide exactly, because for the estat overid, difference table the reduced model (without the level moment conditions) was computed using a restricted weighting matrix, taking the weighting matrix of the full model and leaving out the rows and columns for the level model. This weighting matrix differs from the one computed for the first model. The two test statistics are asymptotically equivalent, but not identical in finite samples.

                  The benefit of using the restricted weighting matrix is that it does not require estimating both models, and that the test statistic is guaranteed to be non-negative. The advantage of comparing the Hansen tests from two separately estimated models is that it gives you full flexibility about which moment conditions you want to test without getting lost in the larger table produced by estat overid, difference.
                  https://twitter.com/Kripfganz

                  Comment


                  • Dear Sebastian Kripfganz

                    I got the following results
                    The results satisfy the autocorrelation test but not the hansen test and also does not satisfy any Sargan-Hansen (difference) test of the overidentifying restrictions
                    You said in somewhere post that if observation is very large then the model is very sensitive to the misspecification of model.
                    Then do I have to disregard this model and data or is there any remedy for the rejection of sagan-hansen test?
                    Thanks lot in advance


                    xtdpdgmm L(0/1).dlntfp L(1/1).dlnrnd L(1/1).dinvest L(1/1).dlnrcapital i.type ,
                    > model(diff) gmmiv(L.dlntfp, lag(1 . ) ) gmmiv(L.dlnrnd, lag(1 . )) gmmiv(L.dinves
                    > t, lag(1 . )) gmmiv(L.dlnrcapital,lag(1 . )) gmmiv(L.dlntfp, model(l)lag(0 0)diff
                    > ) gmmiv(L.dlnrnd, model(l)lag(0 0)diff) gmmiv(L.dinvest, model(l)lag(0 0)diff) gm
                    > miv(L.dlnrcapital,model(l)lag(0 0)diff) iv( i.type ,model(l) )vce(robust) teffects
                    > overid two


                    Group variable: firmid Number of obs = 29827
                    Time variable: year Number of groups = 4267

                    Moment conditions: linear = 118 Obs per group: min = 4
                    nonlinear = 0 avg = 6.990157
                    total = 118 max = 7

                    (Std. err. adjusted for 4,267 clusters in firmid)
                    ------------------------------------------------------------------------------
                    | WC-Robust
                    dlntfp | Coefficient std. err. z P>|z| [95% conf. interval]
                    -------------+----------------------------------------------------------------
                    dlntfp |
                    L1. | .4948371 .0166118 29.79 0.000 .4622785 .5273956
                    |
                    dlnrnd |
                    L1. | .004618 .0017585 2.63 0.009 .0011713 .0080647
                    |
                    dinvest |
                    L1. | -3.41e-07 9.33e-06 -0.04 0.971 -.0000186 .000018
                    |
                    dlnrcapital |
                    L1. | -.0173935 .0027628 -6.30 0.000 -.0228086 -.0119785
                    |
                    _Itype_2 | -.0070249 .0048173 -1.46 0.145 -.0164667 .0024168
                    _Itype_3 | -.0506892 .0107092 -4.73 0.000 -.0716788 -.0296995
                    _Itype_4 | -.0626915 .0113263 -5.54 0.000 -.0848906 -.0404924
                    |
                    year |
                    2016 | -.0126684 .0015735 -8.05 0.000 -.0157524 -.0095843
                    2017 | -.0137031 .0016652 -8.23 0.000 -.0169667 -.0104394
                    2018 | -.0061274 .0015763 -3.89 0.000 -.0092169 -.0030379
                    2019 | -.017485 .0016935 -10.32 0.000 -.0208042 -.0141659
                    2020 | -.0159248 .0017539 -9.08 0.000 -.0193625 -.0124872
                    2021 | -.0141207 .001876 -7.53 0.000 -.0177975 -.0104439
                    |
                    _cons | .0527505 .010136 5.20 0.000 .0328844 .0726167
                    ------------------------------------------------------------------------------
                    Instruments corresponding to the linear moment conditions:
                    1, model(diff):
                    2016:L1.L.dlntfp 2017:L1.L.dlntfp 2018:L1.L.dlntfp 2019:L1.L.dlntfp
                    2020:L1.L.dlntfp 2021:L1.L.dlntfp 2017:L2.L.dlntfp 2018:L2.L.dlntfp
                    2019:L2.L.dlntfp 2020:L2.L.dlntfp 2021:L2.L.dlntfp 2018:L3.L.dlntfp
                    2019:L3.L.dlntfp 2020:L3.L.dlntfp 2021:L3.L.dlntfp 2019:L4.L.dlntfp
                    2020:L4.L.dlntfp 2021:L4.L.dlntfp 2020:L5.L.dlntfp 2021:L5.L.dlntfp
                    2021:L6.L.dlntfp
                    2, model(diff):
                    2016:L1.L.dlnrnd 2017:L1.L.dlnrnd 2018:L1.L.dlnrnd 2019:L1.L.dlnrnd
                    2020:L1.L.dlnrnd 2021:L1.L.dlnrnd 2017:L2.L.dlnrnd 2018:L2.L.dlnrnd
                    2019:L2.L.dlnrnd 2020:L2.L.dlnrnd 2021:L2.L.dlnrnd 2018:L3.L.dlnrnd
                    2019:L3.L.dlnrnd 2020:L3.L.dlnrnd 2021:L3.L.dlnrnd 2019:L4.L.dlnrnd
                    2020:L4.L.dlnrnd 2021:L4.L.dlnrnd 2020:L5.L.dlnrnd 2021:L5.L.dlnrnd
                    2021:L6.L.dlnrnd
                    3, model(diff):
                    2016:L1.L.dinvest 2017:L1.L.dinvest 2018:L1.L.dinvest 2019:L1.L.dinvest
                    2020:L1.L.dinvest 2021:L1.L.dinvest 2017:L2.L.dinvest 2018:L2.L.dinvest
                    2019:L2.L.dinvest 2020:L2.L.dinvest 2021:L2.L.dinvest 2018:L3.L.dinvest
                    2019:L3.L.dinvest 2020:L3.L.dinvest 2021:L3.L.dinvest 2019:L4.L.dinvest
                    2020:L4.L.dinvest 2021:L4.L.dinvest 2020:L5.L.dinvest 2021:L5.L.dinvest
                    2021:L6.L.dinvest
                    4, model(diff):
                    2016:L1.L.dlnrcapital 2017:L1.L.dlnrcapital 2018:L1.L.dlnrcapital
                    2019:L1.L.dlnrcapital 2020:L1.L.dlnrcapital 2021:L1.L.dlnrcapital
                    2017:L2.L.dlnrcapital 2018:L2.L.dlnrcapital 2019:L2.L.dlnrcapital
                    2020:L2.L.dlnrcapital 2021:L2.L.dlnrcapital 2018:L3.L.dlnrcapital
                    2019:L3.L.dlnrcapital 2020:L3.L.dlnrcapital 2021:L3.L.dlnrcapital
                    2019:L4.L.dlnrcapital 2020:L4.L.dlnrcapital 2021:L4.L.dlnrcapital
                    2020:L5.L.dlnrcapital 2021:L5.L.dlnrcapital 2021:L6.L.dlnrcapital
                    5, model(level):
                    2016:D.L.dlntfp 2017:D.L.dlntfp 2018:D.L.dlntfp 2019:D.L.dlntfp
                    2020:D.L.dlntfp 2021:D.L.dlntfp
                    6, model(level):
                    2016:D.L.dlnrnd 2017:D.L.dlnrnd 2018:D.L.dlnrnd 2019:D.L.dlnrnd
                    2020:D.L.dlnrnd 2021:D.L.dlnrnd
                    7, model(level):
                    2016:D.L.dinvest 2017:D.L.dinvest 2018:D.L.dinvest 2019:D.L.dinvest
                    2020:D.L.dinvest 2021:D.L.dinvest
                    8, model(level):
                    2016:D.L.dlnrcapital 2017:D.L.dlnrcapital 2018:D.L.dlnrcapital
                    2019:D.L.dlnrcapital 2020:D.L.dlnrcapital 2021:D.L.dlnrcapital
                    9, model(level):
                    _Itype_2 _Itype_3 _Itype_4
                    10, model(level):
                    2016bn.year 2017.year 2018.year 2019.year 2020.year 2021.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 = -20.4888 Prob > |z| = 0.0000
                    H0: no autocorrelation of order 2 z = 1.3926 Prob > |z| = 0.1638
                    H0: no autocorrelation of order 3 z = 1.2584 Prob > |z| = 0.2083

                    . estat overid

                    Sargan-Hansen test of the overidentifying restrictions
                    H0: overidentifying restrictions are valid

                    2-step moment functions, 2-step weighting matrix chi2(104) = 279.9075
                    Prob > chi2 = 0.0000

                    2-step moment functions, 3-step weighting matrix chi2(104) = 277.7027
                    Prob > chi2 = 0.0000

                    . 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(diff) | 146.8224 83 0.0000 | 133.0851 21 0.0000
                    2, model(diff) | 239.7621 83 0.0000 | 40.1453 21 0.0071
                    3, model(diff) | 258.7313 83 0.0000 | 21.1761 21 0.4482
                    4, model(diff) | 224.2280 83 0.0000 | 55.6795 21 0.0001
                    5, model(level) | 254.1427 98 0.0000 | 25.7648 6 0.0002
                    6, model(level) | 265.6027 98 0.0000 | 14.3047 6 0.0264
                    7, model(level) | 273.3105 98 0.0000 | 6.5969 6 0.3597
                    8, model(level) | 266.5003 98 0.0000 | 13.4072 6 0.0370
                    9, model(level) | 272.5903 101 0.0000 | 7.3171 3 0.0624
                    10, model(level) | 271.3848 98 0.0000 | 8.5227 6 0.2023
                    model(diff) | 75.4602 20 0.0000 | 204.4472 84 0.0000
                    model(level) | 194.3691 71 0.0000 | 85.5384 33 0.0000



                    .

                    Comment


                    • Indeed, large sample sizes make it easier to detect violations of the model assumptions. Unfortunately, in your case the difference-in-Hansen tests are not helpful for finding a particular violation. I am afraid, further guidance needs to come from economic theory. For example, there might be relevant omitted variables, or it might be worth considering whether the timing of the effects is appropriate (i.e. whether contemporaneous regressors might be more appropriate than lagged regressors, or whether further lags might be relevant).
                      https://twitter.com/Kripfganz

                      Comment


                      • Dear professor Sebastian Kripfganz
                        in diff or system gmm , in additio to hansen-sagan overidentifying restrictions test, is there any relevance test for the gmm or standard instruments?

                        Comment


                        • I recommend to have a look at the tests implemented in the underid command; see slides 43 to 47 of my 2019 London Stata Conference presentation.
                          https://twitter.com/Kripfganz

                          Comment


                          • Dear professor Sebastian Kripfganz
                            Roodman said that xtabond2 does not require the lagged dependent variable to appear on the right-hand side(Roodman,2009.p.127.) .Then does the model change from dynamic to static and can we interpret the results as same as xtivreg,fe ? with applying gmm stype instrument for the other independent variables? In this case what kinds of test do the model have to pass?

                            Comment


                            • That's correct. Without the lagged dependent variable, it becomes a static model, similar to xtivreg, fe. You normally still need the same tests: the Hansen test for the validity of the overidentifying restrictions; and even the Arellano-Bond test for serial correlation, because the GMM-type instruments with lagged variables typically still rely on the assumption of no serial correlation in the untransformed errors.
                              https://twitter.com/Kripfganz

                              Comment


                              • Dear professor Sebastian Kripfganz
                                when we implement system gmm in which equation do we have to include the standard instrumental variables? level or difference equation or both?
                                In time dummy case, xtdpdgmm automatically insert time dummies in the level equation with the teffects optioin. which strategy is the best one?
                                In my case according to the choice of equation type, the estimation results differ. So what is the right thing?
                                Thanks lot!
                                Last edited by Mugi Jang; 25 May 2023, 02:33.

                                Comment

                                Working...
                                X