Announcement

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

  • XTIVREG With Lags

    Hi Friends,

    I have a simple question. How should I handle writing lags when using -xtivreg-? To give a sample dataset, I would write something like this:

    Code:
    webuse psidextract
    xtivreg lwage l5.exp (l5.wks=l5.ms), fe
    I want to see the effect of 5 year lags. That means in the first stage equation, the instruments and exogenous variables are lagged five years and then, in the second stage, the endogenous variable is also lagged five years. However, because of the (convenient) way Stata allows you to write this all out at once, I don't know how to tell it to not lag the endogenous outcome in the first step but lag in the second. In the example, I provided, I just wrote l5 for everyhing but that means the first stage is predicting l5.wks which is awkward. I hope that makes sense.

    The simplest workaround is to do it the "old fashioned way" where I save the residuals in the first step and plug them in in a second equation which allows me to control the lags in the way I want. I've been doing that until now but want take advantage of the many other features xtivreg uses (or, in my real case, xtivreg2), e.g. weak identification test etc.

    Thanks

  • #2
    Why not doing

    Code:
    xtivreg lwage l5.exp (l5.wks=l10.ms), fe
    I don't think it's awkward. What you are attempting to do, I'm afraid, might be theoretically invalid or require stronger assumptions than usual.

    Comment


    • #3
      Thank you. The issue here in this example, and more broadly for me, is that in the first stage, ms will be lagged 10 years which makes it 5 less than then the 5year lag of wks I'm aiming for so that's good. But the exogenous variable, exp, will be lagged 5 years in that model as well. In other words, in the first stage, I will have one variable lagged 5 years and another 10 years so the estimates I use in the second step will be a strange mix of these.

      I just don't know how to square the circle of being able to control what lags are used in what stage of the models with xtivreg or something similar.

      Comment


      • #4
        I will have one variable lagged 5 years and another 10 years so the estimates I use in the second step will be a strange mix of these.
        Well I don't think it's strange either. l10.ms serve as exclusive IVs because they conceptually predict l5.wks. But l5.exp being included in the first stage is simply for the completeness of 2SLS -- Even though l5.exp have nothing to do with l5.wks, the former will be routinely included in the first stage. The purpose of 2SLS is to consistently estimate second-stage coefficients. For the first stage, I think only the coefficients of exclusive IVs worth examination, statistically and conceptually.

        Comment

        Working...
        X