你那个不是数据文件,是程序文件
options crt; ? 10e1
?
? by Clint Cummins rev. 11/21/1998
in klein;
freq a;
smpl 20,41;
t = year-1931;
w = w1+w2;
y = cn+i+g-tx;
print t w y cn p w1 i klag e w2 g tx; ? (a)
?
smpl 21,41; ? drop observation for lagged variables
olsq cn c w p p(-1);
olsq i c p p(-1) klag;
olsq w1 c e e(-1) t; ? (b)
?
list ivs c p(-1) klag e(-1) t tx g w2;
2sls(inst=ivs) cn c w p p(-1);
2sls(inst=ivs) i c p p(-1) klag;
2sls(inst=ivs) w1 c e e(-1) t; ? (c)
?
? Note: For the OLS-AR(1) estimates in Table 10.3, Berndt used
? METHOD=CORC, instead of the default AR1 method; he didn't say why.
? For TSP 4.5 (or 4.4 dated after 6/1998), AR1 has a tighter
? convergence tolerance and better iteration method, so it produces
? slightly better results than given in Table 10.3 .
ar1(method=corc) cn c w p p(-1);
ar1(method=corc) i c p p(-1) klag;
ar1(method=corc) w1 c e e(-1) t; ? (d)
?
? Note: For the 2SLS-AR(1) estimates in Table 10.3, Berndt used
? the wrong instruments. The lagged dependent and lagged RHS variables
? are added to the instrument list by default FAIR method in TSP.
? Berndt suggested adding the lagged original instruments -- this is not
? what Fair proposed. These additional instruments are added
? automatically by the default FAIR option in AR1.
? In addition, to get correct results, you will need to have a copy
? of TSP 4.5 or later, or use the LSQ(INST=) command, after constructing
? a rho-differenced equation with FORM(NAR=1). This is because there
? was a bug in AR1(INST=) that was not fixed until 6/1998.
ar1(inst=ivs,method=corc) cn c w p p(-1);
ar1(inst=ivs,method=corc) i c p p(-1) klag;
ar1(inst=ivs,method=corc) w1 c e e(-1) t; ? (e) -- correct instruments
?
? For TSP 4.4 and earlier, you will want to estimate the above with
? FORM and LSQ.
? To use with TSP 4.3 and earlier, remove the VARPREF option from FORM.
smpl 22,41; ? drop one more observation to handle lagged RHS vars as IVs
?list ivs c p(-1) klag e(-1) t tx g w2;
form(nar=1,param,varpref=cn_) cnar1 cn c w p p(-1);
lsq(inst=(ivs,cn(-1),w(-1),p(-2)),tol=1e-7) cnar1;
form(nar=1,param,varpref=i_) iar1 i c p p(-1) klag;
lsq(inst=(ivs,i(-1),p(-2),klag(-1)),tol=1e-7) iar1;
form(nar=1,param,varpref=w1_) w1ar1 w1 c e e(-1) t;
lsq(inst=(ivs,w1(-1),e(-2)),tol=1e-7) w1ar1;
?
? (e) -- Berndt's instruments
? If your copy of TSP is dated earlier than 6/1998, this will reproduce
? the last column of Table 10.3. After 6/1998 (TSP 4.5), a bug was
? fixed in AR1(INST=). AR1(INST=) now produces correct results,
? identical to LSQ(INST=) command on a rho-differenced equation.
? This means Berndt's result can no longer be replicated, but since
? they were affected not only by the bug, but by incorrect instruments,
? there is not much need to do so. So, remove the ? comments from
? the next lines if you really want to try this.
?smpl 21,41;
?list bivs ivs w2(-1) tx(-1) g(-1) p(-2) klag(-1) e(-2);
?ar1(inst=bivs,nofair,method=corc) cn c w p p(-1);
?ar1(inst=bivs,nofair,method=corc) i c p p(-1) klag;
?ar1(inst=bivs,nofair,method=corc) w1 c e e(-1) t;