Announcement

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

  • Absence of difference in Hansen test in xtabond2 and difference between suboptions equation(level) and equation(diff) in ivstyle

    Dear statalists,

    I'm learning how to use the command xtabond2, but I'm not sure about a few things in the results which I couldn't understand. I read parts of the famous article of Roodman of 2009 but I didn't solve the issues.
    From a technical point of view I didn't understand why sometimes the difference in Hansen test is not present - my idea is that it can't be done but I'm not able to explain technically why

    I post one model as an example to show my result

    Code:
     xtabond2 LECI L.LECI LGCF LP LSFI LPA LHC LTO LFDI LGC , gmm(L.LECI, lag(1 6) collapse ) iv( LGCF LP LSFI LPA LHC LTO LFD
    > I LGC ) robust twostep
    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: Code Number of obs = 1038
    Time variable : year Number of groups = 93
    Number of instruments = 16 Obs per group: min = 1
    Wald chi2(9) = 651.63 avg = 11.16
    Prob > chi2 = 0.000 max = 16
    ------------------------------------------------------------------------------
    | Corrected
    LECI | Coefficient std. err. z P>|z| [95% conf. interval]
    -------------+----------------------------------------------------------------
    LECI |
    L1. | .345666 .126138 2.74 0.006 .0984402 .5928919
    |
    LGCF | -.157589 1.114522 -0.14 0.888 -2.342012 2.026834
    LP | 1.420067 .6380981 2.23 0.026 .1694178 2.670716
    LSFI | -2.405806 .8000958 -3.01 0.003 -3.973965 -.8376465
    LPA | .3219948 .2495487 1.29 0.197 -.1671116 .8111011
    LHC | 5.588163 2.899331 1.93 0.054 -.0944215 11.27075
    LTO | 3.191879 1.300292 2.45 0.014 .6433525 5.740405
    LFDI | .2704359 .3048973 0.89 0.375 -.3271518 .8680236
    LGC | 1.893409 1.265654 1.50 0.135 -.5872276 4.374046
    _cons | -37.55127 15.16168 -2.48 0.013 -67.26762 -7.834926
    ------------------------------------------------------------------------------
    Instruments for first differences equation
    Standard
    D.(LGCF LP LSFI LPA LHC LTO LFDI LGC)
    GMM-type (missing=0, separate instruments for each period unless collapsed)
    L(1/6).L.LECI collapsed
    Instruments for levels equation
    Standard
    _cons
    LGCF LP LSFI LPA LHC LTO LFDI LGC
    GMM-type (missing=0, separate instruments for each period unless collapsed)
    D.L.LECI collapsed
    ------------------------------------------------------------------------------
    Arellano-Bond test for AR(1) in first differences: z = -3.13 Pr > z = 0.002
    Arellano-Bond test for AR(2) in first differences: z = 0.22 Pr > z = 0.829
    ------------------------------------------------------------------------------
    Sargan test of overid. restrictions: chi2(6) = 24.85 Prob > chi2 = 0.000
    (Not robust, but not weakened by many instruments.)
    Hansen test of overid. restrictions: chi2(6) = 6.34 Prob > chi2 = 0.386
    (Robust, but can be weakened by many instruments.)
    
    Difference-in-Hansen tests of exogeneity of instrument subsets:
    GMM instruments for levels
    Hansen test excluding group: chi2(5) = 6.33 Prob > chi2 = 0.276
    Difference (null H = exogenous): chi2(1) = 0.01 Prob > chi2 = 0.909
    furthermore I'm not sure if I have to use both the suboptions equation(level) and equation(diff) in the option ivstyle in order to use instruments in the level model and in the transformed model. Third question is what kind of result I obtain with none of two suboptions in ivstyle.

    Any help is appreciated.

  • #2
    The difference-in-Hansen test is only shown if after excluding the respective instruments there are still sufficiently many instruments left to identify all coefficients.

    With a system GMM estimator, I recommend to specify the iv() instruments separately with the equation(level) and equation(diff) suboptions. This is not the same as the default, equation(both). With the former, you get separate moment conditions for the level and the first-differenced model. With the latter, you get combined moment conditions (the sum of the two). This is not "wrong" because if both moment conditions are valid separately, then their sum is also valid. However, it is a quite odd approach (in my opinion).
    https://www.kripfganz.de/stata/

    Comment


    • #3
      Thank you very much Sebastian Kripfganz if I've correctly understand what you said, in my model there are no instruments in order to identify all coefficients in the regression which errors are estimated? The H in the Difference test is the matrix of instruments which are tested, right?

      If I add the suboption of equation(level) and equation(diff) then I add some instruments which I mention in the code in the normal equation of the system and in the transformed one, is it correct?

      Comment


      • #4
        There is no separate estimation of the two equations. In that regard, the idea of two equations is misleading. It is just a help for finding valid instruments. Eventually, the total number of instruments must be at least as large as the number of regressors.

        The "H" in the test output is just an abbreviation for "hypothesis".
        https://www.kripfganz.de/stata/

        Comment


        • #5
          Originally posted by Sebastian Kripfganz View Post
          There is no separate estimation of the two equations. In that regard, the idea of two equations is misleading. It is just a help for finding valid instruments. Eventually, the total number of instruments must be at least as large as the number of regressors"
          Ok, thank you. I'm not sure if I've understand but in my model difference in Hansen test is not possible because without instruments suspected of endogeneity is not possible to estimate original parameters? Could you give me more details about how Stata generate

          Code:
          Hansen test excluding group: chi2(5) = 6.33 Prob > chi2 = 0.276
          Difference (null H = exogenous): chi2(1) = 0.01 Prob > chi2 = 0.909
          and other results related to ivstyle?

          Comment


          • #6
            The test that is shown in your case is a test for the validity of the single instrument for the level equation which is generated by the gmm() option. The instruments generated by the iv() option cannot be tested in your case because without them the model is no longer identified (fewer instruments than coefficients).
            https://www.kripfganz.de/stata/

            Comment


            • #7
              How can I understand when the difference in Hansen test will be shown? If I think about the presence of all regressors in the ivstyle but L.LECI, I don't understand why in this model the test is present.
              Code:
              xtabond2 LECI L.LECI LGCF LP  LSFI  LHC , gmm(L.LECI, lag(1 6) collapse ) iv( LGCF LP   LSFI  LHC )  robust twostep
              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: Code                            Number of obs      =      1407
              Time variable : year                            Number of groups   =        96
              Number of instruments = 12                      Obs per group: min =         1
              Wald chi2(5)  =    408.27                                      avg =     14.66
              Prob > chi2   =     0.000                                      max =        16
              ------------------------------------------------------------------------------
                           |              Corrected
                      LECI | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
              -------------+----------------------------------------------------------------
                      LECI |
                       L1. |    .380279   .1007837     3.77   0.000     .1827467    .5778114
                           |
                      LGCF |   .9829153   .5870725     1.67   0.094    -.1677256    2.133556
                        LP |   1.043949   .3304535     3.16   0.002     .3962718    1.691626
                      LSFI |  -2.599093   .7139682    -3.64   0.000    -3.998445   -1.199742
                       LHC |   7.647794   2.283311     3.35   0.001     3.172587      12.123
                     _cons |  -18.79251   6.105515    -3.08   0.002     -30.7591   -6.825918
              ------------------------------------------------------------------------------
              Instruments for first differences equation
                Standard
                  D.(LGCF LP LSFI LHC)
                GMM-type (missing=0, separate instruments for each period unless collapsed)
                  L(1/6).L.LECI collapsed
              Instruments for levels equation
                Standard
                  _cons
                  LGCF LP LSFI LHC
                GMM-type (missing=0, separate instruments for each period unless collapsed)
                  D.L.LECI collapsed
              ------------------------------------------------------------------------------
              Arellano-Bond test for AR(1) in first differences: z =  -4.11  Pr > z =  0.000
              Arellano-Bond test for AR(2) in first differences: z =   0.50  Pr > z =  0.615
              ------------------------------------------------------------------------------
              Sargan test of overid. restrictions: chi2(6)    =  22.37  Prob > chi2 =  0.001
                (Not robust, but not weakened by many instruments.)
              Hansen test of overid. restrictions: chi2(6)    =   8.64  Prob > chi2 =  0.195
                (Robust, but can be weakened by many instruments.)
              
              Difference-in-Hansen tests of exogeneity of instrument subsets:
                GMM instruments for levels
                  Hansen test excluding group:     chi2(5)    =   7.02  Prob > chi2 =  0.219
                  Difference (null H = exogenous): chi2(1)    =   1.62  Prob > chi2 =  0.203
                iv(LGCF LP LSFI LHC)
                  Hansen test excluding group:     chi2(2)    =   0.87  Prob > chi2 =  0.649
                  Difference (null H = exogenous): chi2(4)    =   7.78  Prob > chi2 =  0.100
              Instruments counted are 12: 6 lags of the first lag of the dependent variable, 4 in ivstyle the costant and the difference of the lag of dependent variable?

              Comment


              • #8
                Sorry, I forgot to tag you Sebastian Kripfganz

                Comment


                • #9
                  In your example in post #7, the gmm() option creates 6 instruments for the first-differenced model and 1 instrument for the level model. The iv() option creates 4 instruments. Excluding the constant, there are 5 regressors in your model. Without the iv() option, there are still 7>5 instruments (again excluding the constant), i.e. the model is still identified and the difference-in-Hansen test can be computed.

                  In your initial example in post #1, the gmm() option also creates 6 instruments for the first-differenced model and 1 instrument for the level model. The iv() option creates 8 instruments. Excluding the constant, there are 9 regressors in the model. Without the iv() option, the remaining 7<9 instruments are no longer sufficient to identify the model.
                  https://www.kripfganz.de/stata/

                  Comment


                  • #10
                    Thank you very much Sebastian Kripfganz. Is there a way to know how Stata chooses instruments which will be tested through the difference in Hansen test? The result of the Hansen excluding group test is related to instruments not suspected of endogeneity?

                    Comment


                    • #11
                      The only question is whether the model is still identified after the removal of a group of instruments. All instruments specified in a single iv() option form a group of instruments. They are not split into separate groups for testing purposes. If you want to test some instruments or groups of instruments separately, you need to put them into separate iv() options (or gmm() options).
                      https://www.kripfganz.de/stata/

                      Comment


                      • #12
                        Originally posted by Sebastian Kripfganz View Post
                        The only question is whether the model is still identified after the removal of a group of instruments. All instruments specified in a single iv() option form a group of instruments. They are not split into separate groups for testing purposes. If you want to test some instruments or groups of instruments separately, you need to put them into separate iv() options (or gmm() options).
                        Ok, fine, I'm asking because I'm not an expert of the command and I can become confused by its results, as the numbers after chi2 whose nature I don't know. If you tell me that the difference tests include all instruments of gmmstyle and ivstyle what's the meaning of Hansen excluding group test? Is the test for the unrestricted model (without instruments suspected of endogeneity)?

                        Comment


                        • #13
                          Think about a model with two sets of instruments A and B and assume that each of the two sets is sufficient to identify the model (i.e. at least as many instruments as regressors). Now consider the following three tests:
                          1. A Hansen overidentification test including all instruments A and B. This is a test of the joint validity of all overidentifying restrictions. (Strictly speaking, it is not a test of the joint validity of all instruments because you always need to make the untestable assumption that there are as many valid instruments as regressors. Thus, you can only test the validity of the additional instruments, although no explicit choice is made about which of the instruments are assumed to be valid. As a consequence, the alternative hypothesis is not very specific.)
                          2. A Hansen overidentification test for a model with instruments A only (Hansen test excluding group B). This test is similar to the one in 1., just with a narrower set of instruments.
                          3. A difference-in-Hansen test, which is effectively the difference between the test statistics in 1 and 2. This can be seen as a test of the validity of the instruments B, assuming that all instruments A are valid. Thus, this test is meaningless if the test in 2. rejected the null hypothesis.

                          More on the GMM estimation of linear dynamic panel data models:
                          https://www.kripfganz.de/stata/

                          Comment


                          • #14
                            Thank you very much Sebastian Kripfganz

                            Comment

                            Working...
                            X