Announcement

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

  • system GMM with high dimensional fixed effects

    Hello everyone!

    I am currently running a System GMM model for bilateral trade flows at the origin-destination-product-year (ijht) level. I aim to control for origin-product-year fixed effects (iht) and destination-product-year fixed effects (jht). Here is the xtabond2 command I have in mind:
    Code:
    xtabond2 y L1.y, gmm(L1.y, lag(2 .) collapse) iv(i.iht i.jht) twostep robust small
    The problem I am facing is that the dimensionality of the fixed effects is too large to run in Stata.

    I consulted GPT about this issue, and it suggested purging the fixed effects first using reghdfe, and then running System GMM on the residuals, like this:
    Code:
    reghdfe y, a(iht jht) resid
    predict resid_ijht, resid
    xtabond2 resid_ijht L1.resid_ijht, gmm(L1.resid_ijht, lag(2 .) collapse) twostep robust small
    Could anyone confirm if this is an appropriate solution? If not, what would be the best way to deal with high-dimensional fixed effects in this context?

    Many thanks for your help!

    Best regards,
    Arlen
Working...
X