Announcement

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

  • How do I use the forward orthogonal deviation transformation for exogenous instruments in xtdpdgmm and xtabond2?

    Hello everyone,

    I am having trouble understanding how to use the forward orthogonal deviations (FOD) transformation for exogenous instruments in the command xtdpdgmm. By exogenous instruments, I mean variables that appear in the regression and are uncorrelated with unobserved time-varying factors. It seems that specifying the orthogonal option in xtabond2 means any variables specified in ivstyle() are transformed by FOD and then used in the instrument matrix. However, using model(fodev) in xtdpdgmm does not perform this transformation. I am also unsure about the best way to specify ivstyle() variables when using FOD in xtabond2. I will use the dataset from "http://www.stata-press.com/data/r13/abdata" and assume the variables w and k are exogenous to demonstrate my point.

    The following two commands produce almost identical results (there are slight differences in standard errors):

    Code:
    xtabond2 n l.n w k yr1978-yr1984, gmmstyle(n, lag(2 .)) ivstyle(w k yr1978-yr1984, passthru) small robust twostep orthogonal nolevel 
    xtdpdgmm n l.n w k yr1978-yr1984, gmm(n, lag(1 .)) iv(f.(w k yr1978-yr1984)) model(fodev) small vce(robust) twostep nocons
    The xtabond2 command applies the forward operator (f.) to the instruments in ivstyle() when the orthogonaloption is specified. I could write ivstyle(l.(w k yr1978-yr1984), passthru)so that the current values of w and k appear in the instrument matrix rather than their values one period ahead. Is this always preferable or should the decision be based on the relative performance of the model in each case, such as the expected signs of the estimated coefficients and the Hausman test?

    If I remove the passthru option in xtabond2, the instruments in ivstyle() are transformed by FOD.

    Code:
    xtabond2 n l.n w k yr1978-yr1984, gmmstyle(n, lag(2 .)) ivstyle( w k yr1978-yr1984 ) small robust twostep orthogonal nolevel
    I cannot find a way of doing this automatically in xtdpdgmm. I can obtain very similar results to xtabond2 by using the tstransform command to generate FOD manually and then putting these in the iv() set or in gmm( , lag(0 0) collapse).

    Code:
      foreach x of varlist w k yr1978-yr1984 {
         qui tstransform `x', fdemean 
     }
    xtdpdgmm n l.n w k yr1978-yr1984, gmm(n, lag(1 .)) iv(w_FDM k_FDM yr1978_FDM-yr1984_FDM) model(fodev) small vce(robust) twostep nocons
    Is there a way to get these results within xtdpdgmm? Furthermore, does xtabond2 automatically apply the FOD transformation to the instruments in ivstyle()(without the passthru option) because this is the most intuitive thing to do?

    Any help is greatly appreciated.

  • #2
    Joshua Clark

    First of all: To also match the standard errors in your initial example, add the nolevel option to xtdpdgmm:
    Code:
    xtabond2 n l.n w k yr1978-yr1984, gmmstyle(n, lag(2 .)) ivstyle(w k yr1978-yr1984, passthru) small robust twostep orthogonal nolevel
    
    xtdpdgmm n l.n w k yr1978-yr1984, gmm(n, lag(1 .)) iv(F.(w k yr1978-yr1984)) model(fodev) small vce(robust) twostep nolevel
    The fact that xtabond2 internally applies the forward operator to the instruments can be confusing. To maximize the correlation of the instruments with the regressors, the contemporaneous values should be used (which would require specifying lagged values for the instruments in xtabond2).

    There is no option in xtdpdgmm to apply forward-orthogonal deviations to the instruments. You could indeed use my tstransform command to manually create forward-orthogonally deviated variables which you can then supply as instruments. I can see why you might want to do it: to maximize the correlation of the instruments with the transformed regressors.

    To match the results from xtabond2 and xtdpdgmm, you need to add the rescale option to the tstransform command:
    Code:
    xtabond2 n l.n w k yr1978-yr1984, gmmstyle(n, lag(2 .)) ivstyle(w k yr1978-yr1984) small robust twostep orthogonal nolevel
    
    foreach x of varlist w k yr1978-yr1984 {
         qui tstransform `x', fdemean rescale
    }
    xtdpdgmm n l.n w k yr1978-yr1984, gmm(n, lag(1 .)) iv(w_FDM k_FDM yr1978_FDM-yr1984_FDM) model(fodev) small vce(robust) twostep nolevel
    https://www.kripfganz.de/stata/

    Comment


    • #3
      Thanks very much for your response Sebastian Kripfganz, it is all much clearer now.

      Comment

      Working...
      X