Announcement

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

  • AR(1) and AR(2) values are missing (xtabond2 command)

    Hi everyone,

    I am using the xtabond2 command to execute system GMM.
    My data: n=33, t=6, which satisfies the small t large n dataset required by GMM.
    Here are the results that I got from stata 15:

    xtabond2 g FDI y SCH TRADE POP FIN INV, gmm(g FDI TRADE FIN, lag(2 2)) iv(l.y SCH POP INV) small 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 robust weighting matrix for Hansen test.
    Difference-in-Sargan/Hansen statistics may be negative.

    Dynamic panel-data estimation, one-step system GMM
    ------------------------------------------------------------------------------
    Group variable: ID Number of obs = 44
    Time variable : Year Number of groups = 22
    Number of instruments = 17 Obs per group: min = 2
    F(7, 21) = 3.82 avg = 2.00
    Prob > F = 0.008 max = 2
    ------------------------------------------------------------------------------
    | Robust
    g | Coef. Std. Err. t P>|t| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    FDI | -.000706 .0012351 -0.57 0.574 -.0032745 .0018625
    y | -.0000432 .0000305 -1.42 0.171 -.0001066 .0000201
    SCH | -.0079411 .1184802 -0.07 0.947 -.2543342 .2384519
    TRADE | -23.41223 15.36501 -1.52 0.142 -55.36551 8.541052
    POP | -19.36038 8.435523 -2.30 0.032 -36.90301 -1.817747
    FIN | 8.016918 2.388503 3.36 0.003 3.049754 12.98408
    INV | -22.87045 24.44595 -0.94 0.360 -73.70858 27.96768
    _cons | 5.930342 8.015413 0.74 0.468 -10.73862 22.59931
    ------------------------------------------------------------------------------
    Instruments for first differences equation
    Standard
    D.(L.y SCH POP INV)
    GMM-type (missing=0, separate instruments for each period unless collapsed)
    L2.(g FDI TRADE FIN)
    Instruments for levels equation
    Standard
    L.y SCH POP INV
    _cons
    GMM-type (missing=0, separate instruments for each period unless collapsed)
    DL.(g FDI TRADE FIN)
    ------------------------------------------------------------------------------
    Arellano-Bond test for AR(1) in first differences: z = . Pr > z = .
    Arellano-Bond test for AR(2) in first differences: z = . Pr > z = .
    ------------------------------------------------------------------------------
    Sargan test of overid. restrictions: chi2(9) = 8.65 Prob > chi2 = 0.470
    (Not robust, but not weakened by many instruments.)
    Hansen test of overid. restrictions: chi2(9) = 6.44 Prob > chi2 = 0.696
    (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.18 Prob > chi2 = 0.674
    Difference (null H = exogenous): chi2(8) = 6.26 Prob > chi2 = 0.618
    iv(L.y SCH POP INV)
    Hansen test excluding group: chi2(5) = 4.10 Prob > chi2 = 0.535
    Difference (null H = exogenous): chi2(4) = 2.33 Prob > chi2 = 0.675

    As you can see that all Sargan and Hansen test results are well above 5% which means that the estimations are valid.
    However I do not know why AR(1) and AR(2) only show .
    I have tried to use deeper lags but both AR(1) and AR(2) still show . only.
    Any help will be very much appreciated. Thank you.

  • #2
    According to the estimation output, there is a maximum of 2 observations (not 6) per group. The lagged differences of just 2 observations do not exist and thus the Arellano-Bond statistics cannot be computed.
    https://twitter.com/Kripfganz

    Comment


    • #3
      Thank you so much, I've figured out why :D Sebastian Kripfganz

      Comment


      • #4
        I have the same problem of the missing output of the AB test using xtabond2. Here is the output I get, can anyone let me know what am I missing?

        .
        . xtabond2 L(0/1).gr inf inv govexp op popgr finv, ///
        > gmmstyle(L.(gr inf inv govexp op popgr), equation(diff) laglimits(1 1) collapse) ///
        > gmmstyle(L.(gr inf inv govexp op popgr), equation(level) laglimits(0 0) collapse) ivstyle
        > (finv, equation(level)) robust nocons
        Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.

        Dynamic panel-data estimation, one-step system GMM
        ------------------------------------------------------------------------------
        Group variable: countryid Number of obs = 57
        Time variable : year Number of groups = 18
        Number of instruments = 13 Obs per group: min = 2
        Wald chi2(7) = 34.26 avg = 3.17
        Prob > chi2 = 0.000 max = 7
        ------------------------------------------------------------------------------
        | Robust
        gr | Coef. Std. Err. z P>|z| [95% Conf. Interval]
        -------------+----------------------------------------------------------------
        gr |
        L1. | -.0215535 .1399065 -0.15 0.878 -.2957652 .2526581
        |
        inf | -.1002752 .0520624 -1.93 0.054 -.2023155 .0017652
        inv | .1016219 .0369339 2.75 0.006 .0292328 .1740111
        govexp | .001073 .0019803 0.54 0.588 -.0028083 .0049542
        op | -.0010932 .0008578 -1.27 0.202 -.0027744 .0005879
        popgr | -.0122443 .1066573 -0.11 0.909 -.2212888 .1968001
        finv | .0020188 .0012484 1.62 0.106 -.000428 .0044655
        ------------------------------------------------------------------------------
        Instruments for first differences equation
        GMM-type (missing=0, separate instruments for each period unless collapsed)
        L.(L.gr L.inf L.inv L.govexp L.op L.popgr) collapsed
        Instruments for levels equation
        Standard
        finv
        GMM-type (missing=0, separate instruments for each period unless collapsed)
        D.(L.gr L.inf L.inv L.govexp L.op L.popgr) collapsed
        ------------------------------------------------------------------------------
        Arellano-Bond test for AR(1) in first differences: z = . Pr > z = .
        Arellano-Bond test for AR(2) in first differences: z = . Pr > z = .
        ------------------------------------------------------------------------------
        Sargan test of overid. restrictions: chi2(6) = 69.78 Prob > chi2 = 0.000
        (Not robust, but not weakened by many instruments.)
        Hansen test of overid. restrictions: chi2(6) = 5.65 Prob > chi2 = 0.464
        (Robust, but can be weakened by many instruments.)

        Comment


        • #5
          I would guess that you have a data set with too many gaps. You could try my xtdpdgmm command to double check.
          https://twitter.com/Kripfganz

          Comment


          • #6
            Thanks Sebastian! I will try it today and keep you posted on how it goes. Much appreciate your time and effort in responding to our questions. Thanks again.

            Comment


            • #7
              Dear Sebastian, would you please confirm the equivalence of this model in xtdpdgmm?

              xtabond2 L(0/1).gr inf inv govexp op popgr finv, ///
              gmmstyle(L.(gr inf inv govexp op popgr), equation(diff) laglimits(1 1) collapse) ///
              gmmstyle(L.(gr inf inv govexp op popgr), equation(level) laglimits(0 0) collapse) ivstyle
              (finv, equation(level)) robust nocons

              Comment


              • #8
                The syntax for this case should translate in a straightforward way:
                Code:
                xtdpdgmm L(0/1).gr inf inv govexp op popgr finv, ///
                    gmm(L.(gr inf inv govexp op popgr), model(diff) lag(1 1) collapse) ///
                    gmm(L.(gr inf inv govexp op popgr), diff model(level) lag(0 0) collapse) ///
                    iv(finv, model(level)) vce(robust) nocons
                Just notice that with xtdpdgmm you need to explicitly specify the diff suboption to request a first-differencing of the instruments for the level model.

                Also note that it is unusual and generally not recommended to exclude a constant when it contains instruments for the level model.
                https://twitter.com/Kripfganz

                Comment


                • #9
                  Much appreciated Sebastian, thank you!

                  Comment


                  • #10
                    My gmm estimation output does not display AR(2). My T is 4 and N is 31. The estimation output is as follows:
                    xtabond2 lnbackward_part laglnbackward logfdi lngdp_percapita ln_patents Political_stability rentforresourcesgdp lin
                    > ershippingconnectivity hdi capitalstoclgdp weightedmfntariffrate tradeopenness, gmm( laglnbackward logfdi lngdp_perc
                    > apita ln_patents tradeopenness capitalstoclgdp Political_stability , laglimits(2 2) eq(level) collapse) gmm( lnbackw
                    > ard_part logfdi lngdp_percapita ln_patents tradeopenness capitalstoclgdp Political_stability , laglimits(1 1) eq(dif
                    > f) collapse) iv( rentforresourcesgdp linershippingconnectivity individualsusinginternet weightedmfntariffrate hdi ,
                    > eq(level)) twostep robust nodiffsargan
                    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.

                    Dynamic panel-data estimation, two-step system GMM

                    Group variable: Country Number of obs = 93
                    Time variable : year Number of groups = 31
                    Number of instruments = 19 Obs per group: min = 3
                    Wald chi2(11) = 76140.84 avg = 3.00
                    Prob > chi2 = 0.000 max = 3

                    Corrected
                    lnbackward_part Coef. Std. Err. z P>z [95% Conf. Interval]

                    laglnbackward .506341 .3412266 1.48 0.138 -.1624508 1.175133
                    logfdi .9762495 .5446065 1.79 0.073 -.0911596 2.043659
                    lngdp_percapita .0478893 .224692 0.21 0.831 -.3924989 .4882776
                    ln_patents .0281805 .1107136 0.25 0.799 -.1888141 .2451751
                    Political_stability -.2105374 .4577576 -0.46 0.646 -1.107726 .6866511
                    rentforresourcesgdp -.0108156 .0439986 -0.25 0.806 -.0970512 .07542
                    linershippingconnectivity .0019557 .016869 0.12 0.908 -.0311069 .0350183
                    hdi -2.337256 7.177985 -0.33 0.745 -16.40585 11.73134
                    capitalstoclgdp .0045885 .4389777 0.01 0.992 -.8557919 .8649689
                    weightedmfntariffrate -.1803708 .0840757 -2.15 0.032 -.3451561 -.0155855
                    tradeopenness .0022938 .0039868 0.58 0.565 -.0055202 .0101078
                    _cons 7.748863 9.103925 0.85 0.395 -10.0945 25.59223

                    Instruments for first differences equation
                    GMM-type (missing=0, separate instruments for each period unless collapsed)
                    L.(lnbackward_part logfdi lngdp_percapita ln_patents tradeopenness
                    capitalstoclgdp Political_stability) collapsed
                    Instruments for levels equation
                    Standard
                    rentforresourcesgdp linershippingconnectivity individualsusinginternet
                    weightedmfntariffrate hdi
                    _cons
                    GMM-type (missing=0, separate instruments for each period unless collapsed)
                    DL2.(laglnbackward logfdi lngdp_percapita ln_patents tradeopenness
                    capitalstoclgdp Political_stability) collapsed

                    Arellano-Bond test for AR(1) in first differences: z = -0.88 Pr > z = 0.377
                    Arellano-Bond test for AR(2) in first differences: z = . Pr > z = .

                    Sargan test of overid. restrictions: chi2(7) = 38.26 Prob > chi2 = 0.000
                    (Not robust, but not weakened by many instruments.)
                    Hansen test of overid. restrictions: chi2(7) = 10.16 Prob > chi2 = 0.179
                    (Robust, but weakened by many instruments.)

                    Can anybody suggest a way to get AR(2) and what should be the sargan p value for the estimation to be valid?

                    Comment


                    • #11
                      You need at least 4 time periods for the AR(2) test to be computable. According to the output, you only have 3 time periods. One time period got lost because of the lagged dependent variable.
                      https://twitter.com/Kripfganz

                      Comment


                      • #12
                        Hi all. I am facing exactly the same situation. Which is the best way to deal with this circumstance? Are there any alternative serial correlation tests that can be used in the context of system GMM? is it appropriate to just state in the paper that the AR(2) could not be computed? Thank you!!!

                        Comment


                        • #13
                          Please avoid double posting the same question in multiple topics!

                          Please see my response in the other topic, where I recommend using xtdpdgmm as an alternative to xtabond2: https://www.statalist.org/forums/for...92#post1730392
                          https://twitter.com/Kripfganz

                          Comment

                          Working...
                          X