Announcement

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

  • How to set (lag # #) in xtabond2 models

    Dear Stata-listers:

    I am new to system GMM and have an elementary question about how to set the number of lags in gmm(lag # #) of xtabond2. First, I run the following regression:

    Code:
    xtabond2 dgdplev koenpov50d litotedugdppop unemrall ipct_csmf totsshead lrgdpopc if id~=10 &year>1979, gmm(dgdplev koenpov50d litotedugdppop, lag(2 2) equ(diff) collapse) gmm(dgdplev koenpov50d litotedugdppop, lag(1 1) eq(level) collapse) iv(unemrall ipct_csmf totsshead lrgdpopc,eq(level)) two robust small
    Then I decide that I should lag all my independent variables by 1 period and run the following regression:

    Code:
    xtabond2 dgdplev l.koenpov50d l.litotedugdppop l.unemrall l.ipct_csmf l.totsshead l.lrgdpopc if id~=10 &year>1979, gmm(dgdplev l.koenpov50d l.litotedugdppop, lag(2 2) equ(diff) collapse) gmm(dgdplev l.koenpov50d l.litotedugdppop, lag(1 1) eq(level) collapse) iv(l.unemrall l.ipct_csmf l.totsshead l.lrgdpopc,eq(level)) two robust small
    My questions is when I run these regressions, do I need to change the number of lags in (lag # #) that appear in gmm() twice? I would like to know whether and how I should write the #s in lag(# #). I would like to do this in a methodologically correct way.

    I thank you in advance for your help.

    Best wishes,

    Taka Sakamoto

  • #2
    I would probably do

    Code:
    xtabond2 dgdplev l.koenpov50d l.litotedugdppop l.unemrall l.ipct_csmf l.totsshead l.lrgdpopc if id~=10 &year>1979, gmm(dgdplev koenpov50d litotedugdppop, lag(2 2) collapse) iv(l.unemrall l.ipct_csmf l.totsshead l.lrgdpopc,eq(level)) two robust small
    or
    Code:
    xtabond2 dgdplev l.koenpov50d l.litotedugdppop l.unemrall l.ipct_csmf l.totsshead l.lrgdpopc if id~=10 &year>1979, gmm(dgdplev koenpov50d litotedugdppop, lag(2 2) collapse eq(diff)) gmm(dgdplev koenpov50d litotedugdppop, lag(2 2) collapse eq(left))iv(l.unemrall l.ipct_csmf l.totsshead l.lrgdpopc,eq(level)) two robust small
    You apparently want to treat all these regressors as endogenous. lag(2 2) is the standard treatment for that.

    Comment


    • #3
      Dear Mr. Roodman:

      Thank you so much for teaching me how to use or adjust the number of lags that go into gmm(# #) option. It’s tremendous help. May I ask you a question? If I want to lag all the independent variables by 2 or 3 periods, the number of lags in gmm(# #) option should remain the same (i.e., (lag 2 2) for both the difference and level equations) or they need to adjusted?

      Thank you again for your kind help.

      Best wishes,

      Taka

      Comment


      • #4
        Hello everyone

        May someone help me out? I am new to econometrics and I need to use GMM however, the detailed videos I found on understanding GMM are from 4 years ago and after watching them and referring to the referenced articles, they led me to this code if I want to run a two-system GMM:

        code1:
        xtabond2 y l.y l.x1 l.x2 l.x3 l.x4 y*, gmm(I.y, collapse) iv(l.x1 l.x2 l.x3 l.x4 y*) (equation(level)) nodiffsargan twostep robust orthogonal small

        When I came here, I saw different things and my mind is all over the place because there seems to be more information I need, but I'm not sure where to start. Is this code 2 correct?

        code 2: xtabond2 y I.y l.x1 l.x2 l.x3 l.x4 y*, gmm(I.y l.x1 l.x2 l.x3 l.x4, l(0 2)collapse) v(i.year eq(level)) twostep robust ar(2)

        If not, what do I need to know and how different is it from code 1?

        What is the correct way of writing the code?

        NB: I haven't run any regressions yet.

        Comment

        Working...
        X