Announcement

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

  • xtabond or xtbond2

    Hello,
    I am rather new to Stata and now trying to use a dynamic panel estimator, the one used by Arellano/Bond. My panel data consists of US firm balance sheet data from 1994-2012 and I examine the determinants of Research & Development investments. I run regressions of R&D on Cash flow, Debt, Tobin's Q, PayoutRatio, Size and Age (also including lagged R&D) treating all the explanatory variables as potentially endogenous, but I encounter various problems.
    1. I am not really sure about the right syntax. When using xtabond it looks like this:

    -xtabond RD, end(CF) end(Q) end(Debt) end(PayoutRatio) end(Size) end(lnAge) robust twostep-

    and -estat abond- tells me that I have first order autocorrelation in first-differenced errors. However, when I use xtabond2 and a syntax like this:

    -xtabond2 RD CF Q Debt PayoutRatio lnAge Size i.Year, gmm(CF Q Debt PayoutRatio Size lnAge) iv(i.Year) cluster(FirmID)

    it tells me, I have second order autocorrelation in first-differences, too. This means that I would have to use lags t-3 and longer, right? But how do I implement it the right way? And is this really the way to go or do I actually have to take other things into account, also?
    As you can see, I am a little confused. I have never worked with more complicated statistical methods before and I really hope that you can help me.

    Thank you very much!


  • #2
    Start by reading How to do xtabond2.

    At minimum, it should be noted that xtabond2 does not default to two-step estimation--I'm not sure why you specified the option in the first but not in the second.

    Comment


    • #3
      First of all: Thanks for your reply. I did read the How to do xtabond2, but I am not really sure if my syntax specifies what I want to do. I did work on it a little since posting yesterday, but I don't know if that did the job. Since my data seems to exhibit 2nd order autocorrelation in the first-differenced residuals, I understand that I need to use Lags of t-3 and longer to instrument my explanatory variables. My syntax now looks like this
      Code:
         xtabond2 RD L.RD CF Q Debt PayoutRatio lnAge Size i.Year, gmm(L.RD) gmm(CF, laglimits(3 5)) gmm(Q, laglimits(3 5)) gmm(Debt, laglimits (3 5)) gmm(PayoutRatio, laglimits (3 5)) gmm(Size, laglimits(3 5)) gmm(lnAge, laglimits (3 5)) iv(i.Year) cluster(FirmID) artests(3) small
      The variable coefficients I get seem to be in line with theoretical arguments in terms of sign and significance. But both the Sargan and Hansen test also reject the validity of my instruments, if I interpret the rest of my output correctly:

      Code:
       
      Arellano-Bond test for AR(1) in first differences: z = -10.86  Pr > z =  0.000
      Arellano-Bond test for AR(2) in first differences: z =  -0.73  Pr > z =  0.467
      Arellano-Bond test for AR(3) in first differences: z =   0.61  Pr > z =  0.544
      ------------------------------------------------------------------------------
      Sargan test of overid. restrictions: chi2(529)  =1675.12  Prob > chi2 =  0.000
        (Not robust, but not weakened by many instruments.)
      Hansen test of overid. restrictions: chi2(529)  = 688.04  Prob > chi2 =  0.000
        (Robust, but weakened by many instruments.)
      
      Difference-in-Hansen tests of exogeneity of instrument subsets:
        GMM instruments for levels
          Hansen test excluding group:     chi2(410)  = 534.66  Prob > chi2 =  0.000
          Difference (null H = exogenous): chi2(119)  = 153.37  Prob > chi2 =  0.018
        gmm(L.RD, lag(1 .))
          Hansen test excluding group:     chi2(370)  = 473.21  Prob > chi2 =  0.000
          Difference (null H = exogenous): chi2(159)  = 214.82  Prob > chi2 =  0.002
        gmm(CF, lag(3 5))
          Hansen test excluding group:     chi2(467)  = 611.82  Prob > chi2 =  0.000
          Difference (null H = exogenous): chi2(62)   =  76.22  Prob > chi2 =  0.106
        gmm(Q, lag(3 5))
          Hansen test excluding group:     chi2(466)  = 607.51  Prob > chi2 =  0.000
          Difference (null H = exogenous): chi2(63)   =  80.53  Prob > chi2 =  0.068
        gmm(Debt, lag(3 5))
          Hansen test excluding group:     chi2(466)  = 615.64  Prob > chi2 =  0.000
          Difference (null H = exogenous): chi2(63)   =  72.40  Prob > chi2 =  0.196
        gmm(PayoutRatio, lag(3 5))
          Hansen test excluding group:     chi2(466)  = 633.98  Prob > chi2 =  0.000
          Difference (null H = exogenous): chi2(63)   =  54.06  Prob > chi2 =  0.782
        gmm(Size, lag(3 5))
          Hansen test excluding group:     chi2(466)  = 602.74  Prob > chi2 =  0.000
          Difference (null H = exogenous): chi2(63)   =  85.29  Prob > chi2 =  0.032
        gmm(lnAge, lag(3 5))
          Hansen test excluding group:     chi2(466)  = 620.16  Prob > chi2 =  0.000
          Difference (null H = exogenous): chi2(63)   =  67.87  Prob > chi2 =  0.315
      Now what does this mean for my model specifications? I also tried laglimit (3 .) with pretty much the same results. But how can the t-3 instruments not be valid, when there's no sign of AR(2) in first differences? Is there still any inference possible with that kind of Sargan/Hansen test statistic? Or is it completely invalid?

      Any advice would be highly appreciated!

      Comment


      • #4
        Alright, well as I keep working on this I think I might have discovered some of my mistakes. Since I do not have AR(2) in first-differenced errors after including L.RD in my list of explanatory variables, it occured to me that I can still use Lags t-2 and longer as valid instruments. I now specified two "different" models, one with the xtabond command and one with the xtabond2 command. However, I think the only difference is that I am now able to include Year Fixed Effects in the xtabond2 syntax. (Is there a way to include this in xtabond, too?)

        First specification looks like the following:
        Code:
         xtabond RD, end(CF) end(Q) end(Debt) end(PayoutRatio) end(Size) end(lnAge) robust twostep artests(3)
        Second one looks like this:
        Code:
           xtabond2 RD L.RD CF Q Debt PayoutRatio lnAge Size i.Year, gmm(L.RD) gmm(CF, laglimits(2 .)) gmm(Q, laglimits(2 .)) gmm(Debt, laglimits (2 .)) gmm(PayoutRatio, laglimits (2 .)) gmm(Size, laglimits(2 .)) gmm(lnAge, laglimits (2 .)) iv(i.Year) cluster(FirmID) artests(3) small noleveleq twostep
        And the coefficients are almost equal (minor dissimilarities which I interpret as a result of the included Year FE).
        Now the Hanses test statistic looks like this.

        Code:
        Sargan test of overid. restrictions: chi2(1064) =2356.39  Prob > chi2 =  0.000
          (Not robust, but not weakened by many instruments.)
        Hansen test of overid. restrictions: chi2(1064) =1089.40  Prob > chi2 =  0.287
          (Robust, but weakened by many instruments.)
        
        Difference-in-Hansen tests of exogeneity of instrument subsets:
          gmm(L.RD, lag(1 .))
            Hansen test excluding group:     chi2(911)  = 933.53  Prob > chi2 =  0.295
            Difference (null H = exogenous): chi2(153)  = 155.87  Prob > chi2 =  0.420
          gmm(CF, lag(2 .))
            Hansen test excluding group:     chi2(911)  = 970.25  Prob > chi2 =  0.085
            Difference (null H = exogenous): chi2(153)  = 119.15  Prob > chi2 =  0.980
          gmm(Q, lag(2 .))
            Hansen test excluding group:     chi2(911)  = 949.31  Prob > chi2 =  0.184
            Difference (null H = exogenous): chi2(153)  = 140.09  Prob > chi2 =  0.765
          gmm(Debt, lag(2 .))
            Hansen test excluding group:     chi2(911)  = 955.76  Prob > chi2 =  0.147
            Difference (null H = exogenous): chi2(153)  = 133.64  Prob > chi2 =  0.868
          gmm(PayoutRatio, lag(2 .))
            Hansen test excluding group:     chi2(911)  = 978.14  Prob > chi2 =  0.060
            Difference (null H = exogenous): chi2(153)  = 111.26  Prob > chi2 =  0.995
          gmm(Size, lag(2 .))
            Hansen test excluding group:     chi2(911)  = 971.64  Prob > chi2 =  0.080
            Difference (null H = exogenous): chi2(153)  = 117.75  Prob > chi2 =  0.984
          gmm(lnAge, lag(2 .))
            Hansen test excluding group:     chi2(911)  = 965.67  Prob > chi2 =  0.102
            Difference (null H = exogenous): chi2(153)  = 123.73  Prob > chi2 =  0.960
          iv(1994b.Year 1995.Year 1996.Year 1997.Year 1998.Year 1999.Year 2000.Year 2001.Year 2002.Year 2003.Year 2004.Year 2005
        > .Year 2006.Year 2007.Year 2008.Year 2009.Year 2010.Year 2011.Year 2012.Year)
            Hansen test excluding group:     chi2(1047) =1070.11  Prob > chi2 =  0.303
            Difference (null H = exogenous): chi2(17)   =  19.29  Prob > chi2 =  0.312
        So, the validity of my instruments is no longer rejected, right? (Value of 0.287)
        My questions now are:
        1. Does this mean I can now use it for causal inference?
        2. Is there a way to include Year Fixed Effects into the original xtabond syntax?
        3. Am I right in saying that the only difference in those two specifications is the included Year Effects? Or is there anything else? (I think that the small sample correction in the xtabond2 and the robust option might not yield the same standard errors)

        I know this is a very long post, but I wanted to be as specific as possible and let you take a look at the exact commands I used.
        Thank you for your time, any help is greatly appreciated!

        Comment


        • #5
          HI,


          I am doing something similar to your work and am wondering if you were able to solve your problem? I particularly have the problem of not being able to get my Sargan/Hansen test right.

          Comment


          • #6
            Hi friends,

            This is my first experience for GMM. It is my pleasure if you could help me, please.

            I should examine the relationship between X and Y across US states over the period 1993–2015 using the
            System GMM estimator. The lagged DVs, along with X1 and X2,
            are treated as endogenous and instrumented for with their lagged first differences. To eliminate the problem of instrument
            proliferation, which can invalidate results, I should collapse the instrument matrix and impose instrumental variable lag limits that satisfy
            the following conditions: (1) the null of the Hansen J test of over-identifying restrictions is not rejected and is not implausibly perfect
            (i.e., 0.05≤p(Hansen) < 1.00); and (2) there is no second-order autocorrelation in the model (i.e., p(AR2) > 0.05) (Roodman,
            2009b). I should include the variables (X3, X4, X5 ) as pre-determined controls in all models, as well as fixed state and
            year effects. ( Fixed effect and first difference)

            I wrote this code But I am not sure it could work.

            xtabond2 Y L.Y L2.Y L.X1 Lx2, gmm( X3 X4 X5 L.Y L2.Y X1 X2, eq(diff) lag(1 1)) nolevel robust

            Please help me by correct code

            ​​​​​​​Forouzan

            Comment

            Working...
            X