Many thanks for your help Mark.
I still get different output using ivreg and xtivreg, fd.
*SET INDIVIDUAL (i) AND TIME (t) INDEXES;
iis country
tis year
sort country year
tsset country year
gen lsrt1=l.lsrt
gen lsrt2=l2.lsrt
gen dlsrt=d.lsrt
gen dlsrt1=d.lsrt1
ivreg dlsrt (dlsrt1=lsrt2)
xtivreg lsrt (l.lsrt=l2.lsrt), fd
gen lsrt1=l.lsrt
(107 missing values generated)
. gen lsrt2=l2.lsrt
(109 missing values generated)
. gen dlsrt=d.lsrt
(107 missing values generated)
. gen dlsrt1=d.lsrt1
(152 missing values generated)
.
. ivreg dlsrt (dlsrt1=lsrt2)
Instrumental variables (2SLS) regression
Source | SS df MS Number of obs =
244
-------------+------------------------------ F( 1, 242) =
1.34
Model | -.719700684 1 -.719700684 Prob > F =
0.2490
Residual | 1.44715929 242 .005979997 R-squared =
.
-------------+------------------------------ Adj R-squared =
.
Total | .727458603 243 .002993657 Root MSE =
.07733
------------------------------------------------------------------------------
dlsrt | Coef. Std. Err. t P>|t| [95% Conf.
Interval]
-------------+----------------------------------------------------------------
dlsrt1 | .8867141 .7674034 1.16 0.249 -.6249287
2.398357
_cons | -.0001804 .0050379 -0.04 0.971 -.0101041
.0097433
------------------------------------------------------------------------------
Instrumented: dlsrt1
Instruments: lsrt2
------------------------------------------------------------------------------
. xtivreg lsrt (l.lsrt=l2.lsrt), fd
First-differenced IV regression Number of obs =
218
Group variable: country Number of groups =
15
R-sq: within = 0.7347 Obs per group: min =
1
between = 0.9999 avg =
15.2
overall = 0.9846 max =
45
chi2(1) =
0.61
corr(u_i, Xb) = -0.9783 Prob > chi2 =
0.4359
------------------------------------------------------------------------------
d.lsrt | Coef. Std. Err. z P>|z| [95% Conf.
Interval]
-------------+----------------------------------------------------------------
lsrt |
LD | -.4967594 .6375814 -0.78 0.436 -1.746396
.7528772
_cons | -.0038265 .0037607 -1.02 0.309 -.0111974
.0035444
-------------+----------------------------------------------------------------
sigma_u | .62887255
sigma_e | .0555244
rho | .99226483 (fraction of variance due to u_i)
------------------------------------------------------------------------------
Instrumented: L.lsrt
Instruments: L2.lsrt
.
end of do-file
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/