Using Stata 12.1 with -xtdpd- 1.3.1 in official Stata and -ivreg2- 1.0.13 from SSC.
I believe (perhaps mistakenly?) that I should be able to replicate results from the -xtdpd- command below, using -ivreg2- (or -ivregress-).
I want to do this in order to take advantage of the weak instrument results reported in by -ivreg2- that are not reported by -xtdpd- (nor -xtabond2-).
But I cannot even get the point estimates from the two commands to match on my firm investment panel.
(Note: I've omitted time dummies and other instruments to try to keep this simpler and isolate the problem.)
Log files of results attached.


I can't see why the commands shouldn't give the same point estimates. They have the same regressors and same instruments.
Clearly I'm missing something (I fear blindingly obvious)... but what?
Any insights much appreciated.
Peter
I believe (perhaps mistakenly?) that I should be able to replicate results from the -xtdpd- command below, using -ivreg2- (or -ivregress-).
I want to do this in order to take advantage of the weak instrument results reported in by -ivreg2- that are not reported by -xtdpd- (nor -xtabond2-).
But I cannot even get the point estimates from the two commands to match on my firm investment panel.
(Note: I've omitted time dummies and other instruments to try to keep this simpler and isolate the problem.)
Code:
xtset assert !mi(IvLK, Q, CFvLK) xtdpd IvLK Q CFvLK, dgmmiv(Q CFvLK, lagrange(2 2)) noconstant twostep vce(robust) * the following commands give different point estimates to -xtdpd- above * but reportedly use smaller samples (despite having same regressors in main equation and same instruments?) * note the fact that -ivregress- and -ivreg2- give the same results suggests this is not an -ivreg2- bug ivreg2 D.IvLK (D.Q D.CFvLK=L2.Q L2.CFvLK), gmm2s noconstant cluster(idv) ivregress gmm D.IvLK (D.Q D.CFvLK=L2.Q L2.CFvLK), noconstant cluster(idv) * now mark the sample used by -ivregress- ... cap drop esample_ivregress mark esample_ivregress if e(sample) * ... and retry -xtdpd- on this restricted sample... but the point estimates are still very different xtdpd IvLK Q CFvLK if esample_ivregress, dgmmiv(Q CFvLK, lagrange(2 2)) noconstant twostep vce(robust) cap drop esample_xtdpd mark esample_xtdpd if e(sample) * finally verify the same sample was used assert esample_ivregress == esample_xtdpd
I can't see why the commands shouldn't give the same point estimates. They have the same regressors and same instruments.
Clearly I'm missing something (I fear blindingly obvious)... but what?
Any insights much appreciated.
Peter
Comment