Hello,

Another question from my side, this time pertaining to GMM models.
I am looking at the code a colleague of mine wrote to regress GMM models.
The xtabond2 command, I understand reasonably well. For example,

Code:
xtabond2 ipub l.ipub l.gov_deb cycle Lgdicap  l.ipriv l.pub_expenditure l.y10_bond_yield l.trade f.expectations i.year, gmm(l.ipub l.gov_deb l.ipriv cycle  l.pub_expenditure l.y10_bond_yield l.trade, lag(2 8)collapse) iv(Lgdicap i.year f.expectations ) nolevel cluster() artest(3)
This is the difference-GMM based on Arellano & Bond.
The only thing you need to do in the command is say:
  • You want a difference gmm
    PHP Code:
    nolevel 
  • You want a collapsed set of instruments
    PHP Code:
    collapse 
  • Which variables are potentially endogenous and then Stata takes lagged values for all these variables as instruments.
[you can correct me if I am mistaken, or if you want to add anything]

I am less sure for the xtivreg2 command. For example:
Code:
xtivreg2 ipub (l.gov_deb= l2.gov_deb l3.gov_deb) Lgdicap cycle L.ipriv L.pub_expenditure l.y10_bond_yield l.trade f.expectations, fe cluster(country) endog(l.gov_deb) first gmm
  • Here, you also have to say which instrument(s) you can use for the potentially endogenous variable, right?
    • And we say there is only one endogenous variable (i.e. l.gov_debt) and we use two instruments (second and third lag of gov_debt).
  • We want the results of the first stage and the related post estimation tests
    PHP Code:
    first 
  • Code:
    gmm
    
    just says we want the first-difference GMM?
Am I correct that you can get similar results from xtabond2 and xtivreg2 if in the latter you identify the same endogenous variables as in the xtabond2 command and you specify, for each endogenous variable, that you want to use its lagged value(s) as an instrument?

Sorry for the questions, but I cannot seem to find much information about this online.

P.S. I would appreciate it greatly if you wouldn't reply by saying "read this or that", but give feedback on the actual questions posed here, so I can really understand it with a practical example.

Thank you for your help,

Willem