Announcement

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

  • Multiple Equation GMM - Set maxiter?

    Hi everyone,

    I'm estimating a set of simultaneous equations with reg3, but wanted to compare estimates with the gmm routine. However, and I'm pretty sure my code is correct, it takes forever to run -- seems like the optimizer gets stuck in a region. I wanted to set a maximum number of iterations so it doesn't go forever, but it gives an error about not being able to use maxiter on the interactive version of gmm. I googled it, but nothing too useful seemed to come up.

    Below, fixed effects are on a metro area (so about 285), x are controls, and x1 is the endogenous regressor in equation 2 that is being instrumented for using z. I'm pretty sure this is specified correctly -- x and the fixed effects need to be included in the instruments() option since only x1 is being instrumented.

    global stage1 "(first: y1 - {xb: x fixed effects})"
    global stage2 "(second: y2 - {b6}*x1 - {xb:})"
    gmm $stage1 $stage2, instruments(second: z x fixed effects) ///
    twostep winitial(id) vce(cluster msaid) iter(20)

    On a broader note, anyone have any ideas why reg3 and gmm could offer different results? The regressions go much, much faster with reg3, so I might just prefer to use it. If interested, the reg3 code is below.

    global stage1 "(first: y1 x fixed effects)"
    global stage2 "(second: y2 x1 x fixed effects)"
    global stage3 "(third: x1 z x fixed effects)"
    quietly reg3 $stage1 $stage2 $stage3, 2sls

    Thank you!

  • #2
    Hey guys,

    Just wanted to check if anyone has thoughts on either of these two dimensions when you have time!

    Comment

    Working...
    X