Announcement

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

  • Sargan-Hansen test

    Hi.

    I am trying to obtain results for the Sargan-Hansen test. However, when I run a regression using xtabond2, I do not get the Sargan-Hansen test statistic. Is there a piece of code that I am missing??

    Kind regards
    Christopher Keegan

  • #2
    Seems to me that the user written command -tabond2- is returning the overidentifying restrictions test:

    Code:
    . use http://www.stata-press.com/data/r7/abdata.dta, clear
    
    . xtabond2 n l.n l(0/1).(w k) yr1980-yr1984, gmm(l.n w k) iv(yr1980-yr1984, passthru) noleveleq small
    Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
    
    Dynamic panel-data estimation, one-step difference GMM
    ------------------------------------------------------------------------------
    Group variable: id                              Number of obs      =       751
    Time variable : year                            Number of groups   =       140
    Number of instruments = 103                     Obs per group: min =         5
    F(10, 741)    =    207.78                                      avg =      5.36
    Prob > F      =     0.000                                      max =         7
    ------------------------------------------------------------------------------
               n |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
               n |
             L1. |   .5847306   .0526328    11.11   0.000     .4814035    .6880576
                 |
               w |
             --. |  -.7204875   .0807712    -8.92   0.000    -.8790551     -.56192
             L1. |   .2072654   .0500393     4.14   0.000     .1090298    .3055011
                 |
               k |
             --. |   .3839347    .052686     7.29   0.000      .280503    .4873663
             L1. |  -.0766793   .0343085    -2.23   0.026    -.1440327   -.0093259
                 |
          yr1980 |  -.0308167   .0089215    -3.45   0.001    -.0483312   -.0133023
          yr1981 |  -.0649783   .0110817    -5.86   0.000    -.0867335   -.0432231
          yr1982 |  -.0375605   .0158624    -2.37   0.018     -.068701     -.00642
          yr1983 |   .0006808   .0209536     0.03   0.974    -.0404548    .0418164
          yr1984 |   .0269716   .0271112     0.99   0.320    -.0262523    .0801955
    ------------------------------------------------------------------------------
    Instruments for first differences equation
      Standard
        yr1980 yr1981 yr1982 yr1983 yr1984
      GMM-type (missing=0, separate instruments for each period unless collapsed)
        L(1/8).(L.n w k)
    ------------------------------------------------------------------------------
    Arellano-Bond test for AR(1) in first differences: z =  -7.33  Pr > z =  0.000
    Arellano-Bond test for AR(2) in first differences: z =  -0.51  Pr > z =  0.608
    ------------------------------------------------------------------------------
    Sargan test of overid. restrictions: chi2(93)   = 204.53  Prob > chi2 =  0.000
      (Not robust, but not weakened by many instruments.)
    
    Difference-in-Sargan tests of exogeneity of instrument subsets:
      iv(yr1980 yr1981 yr1982 yr1983 yr1984, passthru)
        Sargan test excluding group:     chi2(88)   = 179.89  Prob > chi2 =  0.000
        Difference (null H = exogenous): chi2(5)    =  24.64  Prob > chi2 =  0.000

    Comment


    • #3
      My code is as follows:

      xtabond rincome L.rincome

      Thats it. But I don't understand why it does not display the Difference-in-Sargan tests.

      The error is that the equation is not identified, regressors outnumber instruments.

      Comment


      • #4
        You need to explicitly specify instrumental variables with the iv() or gmm() options. The way you specified it, you have 1 endogenous regressor but 0 instruments.
        https://www.kripfganz.de/stata/

        Comment


        • #5
          Thank you this helps a lot

          Comment


          • #6
            I have a problem with Sargan-Hansen test in my panel data. I have more than 85,000 obervations and, applying xtabond2 command, I always get a p-value = 0.000 for the Hansen test. Can the problem be related to this large sample? I wonder if this test is valid in this case.
            Thank you in advance for your answers.

            Comment


            • #7
              With such a large data set, the Sargan-Hansen test will detect already small deviations from a correctly specified model. Those small deviations may not always have substantial implications for the coefficient estimates, but of course we cannot know how big the problem is unless we can find a specification which satisfies the test. If you cannot determine the source of a misspecification problem, you might simply have to interpret the results with caution.
              https://www.kripfganz.de/stata/

              Comment

              Working...
              X