Hello there,
Does anyone know how to perform an VAR with mixture of long and short run restrictions? Likes the one in Gali (1992)? Many thanks.
Ithaca wrote:Hello there,
Does anyone know how to perform an VAR with mixture of long and short run restrictions? Likes the one in Gali (1992)? Many thanks.
*
* Replication file for Gali, "How Well Does the IS-LM Model Fit Postwar U.S.
* Data", QJE 1992, vol 107, no. 2, pp 709-738.
*
open data galiqje1992.rat
calendar(q) 1954
all 1987:3
*
* Use the first month in each quarter in compacting the monthly data
*
data(format=rats,select=1) / gnp tb3 m1 cpi
*
set logy = log(gnp)
set inf = 400.0*log(cpi/cpi{1})
set mgr = 400.0*log(m1/m1{1})
set rr = tb3-inf
set rmgr = mgr-inf
*
@dfunit(det=trend) logy 1955:1 *
@dfunit tb3 1955:1 *
@dfunit inf 1955:1 *
@dfunit mgr 1955:1 *
@dfunit rr 1955:1 *
@dfunit rmgr 1955:1 *
*
@ppunit(det=trend,lags=3) logy 1955:1 *
@ppunit(lags=3) tb3 1955:1 *
@ppunit(lags=3) inf 1955:1 *
@ppunit(lags=3) mgr 1955:1 *
@ppunit(lags=3) rr 1955:1 *
@ppunit(lags=3) rmgr 1955:1 *
*
boxjenk(diffs=1,ma=1,constant) logy 1955:1 *
boxjenk(diffs=1,ma=1,constant) tb3 1955:1 *
boxjenk(diffs=1,ma=1,constant) inf 1955:1 *
boxjenk(diffs=1,ma=1,constant) mgr 1955:1 *
boxjenk(diffs=1,ma=1,constant) rr 1955:1 *
boxjenk(diffs=1,ma=1,constant) rmgr 1955:1 *
*
set drate = tb3-tb3{1}
set ygr = logy-logy{1}
*
diff(center) ygr / cygr
diff(center) drate / cdrate
diff(center) rr / crr
diff(center) rmgr / crmgr
*
system(model=islm)
variables cygr cdrate crr crmgr
lags 1 to 4
end(system)
*
estimate
*
compute masums=inv(%varlagsums)
*
dec rect lr(4,4)
dec rect sr(4,4)
input sr
. 0 0 .
. . . .
. . . .
. . . .
input lr
. 0 0 0
. . . .
. . . .
. . . .
@shortandlong(sr=sr,lr=lr,masums=masums,rperp=rperp,noestimate) %sigma
compute bv=%vec(%bqfactor(%sigma,%varlagsums))
dec vect theta
compute theta=%ginv(rperp)*bv
*
dec frml[rect] bf af
frml bf = %vectorect(rperp*theta,4)
frml af = inv(bf(0))
*
nonlin(parmset=base) theta
nonlin(parmset=r6) af(0)(2,3)+af(0)(2,4)==0.0
nonlin(parmset=r7) af(0)(2,1)==0.0
nonlin(parmset=r8) af(0)(3,3)==0.0
*
cvmodel(parmset=base+r8,b=bf,iters=400) %sigma
cvmodel(parmset=base+r7,b=bf,iters=400) %sigma
cvmodel(parmset=base+r6,b=bf,iters=400) %sigmaReturn to VARs (Vector Autoregression Models)
Users browsing this forum: Bing [Bot] and 1 guest