* * Martin, Hurn, Harris, "Econometric Modelling with Time Series" * Examples 14.13, 14.14, 14.17 from pp 528-534 * Estimating an SVAR with short-run restrictions * open data mcnew.dat calendar(m) 1946:12 data(format=free,org=columns) 1946:12 1991:2 r0 r1 r3 r6 r9 r120 * system(model=var1) variables r0 r1 r3 lags 1 det constant end(system) * estimate(sigma) * * The structural model is an A-type model * nonlin b21 b31 dec frml[rect] afrml frml afrml = ||1.0,0.0,0.0|\$ b21,1.0,0.0|\$ b31,0.0,1.0|| cvmodel(a=afrml,factor=f) %sigma disp "Impact responses" f * * Example 14.14. Long-run restrictions * Note that this is technically incorrect. An overidentified model with * long-run restrictions can't be estimated (properly) in two stages * (with the lags model first, then the structural model given the * estimated lag coefficients) because the long-run restrictions place * non-linear restrictions on the lags. This isn't a problem with a * just-identified model with either long-run restrictions or * short-and-long-run restrictions. * dec rect lr(3,3) input lr . 0 0 . . 0 . 0 . * * This uses the @SHORTANDLONG procedure with the options NOESTIMATE and * RPERP to remap an underlying set of parameters to produce an impact * response matrix which has the restrictions. * compute masums=inv(%varlagsums) @shortandlong(lr=lr,masums=masums,rperp=rp,noestimate) %sigma * * RP is a 9 x 5 matrix. RP x theta, where theta is a 5-vector will * produce the "vec" of a 3x3 impact matrix which will satisfy the long * run restrictions (and this will span the space of all such impact * matrices). * dec vect theta(%cols(rp)) dec frml[rect] lrfrml * frml lrfrml = %vectorect(rp*theta,3) compute [vect] theta=%ginv(rp)*%vec(%decomp(%sigma)) * nonlin theta cvmodel(b=lrfrml,factor=f,dmatrix=identity) %sigma disp "Impact responses with long-run restrictions" f disp "Long run responses" masums*f * * Example 14.17 * * These are included in the output already *