### This script reproduces example 4.7.1 in Lütkepohl and ### Krätzig (2004), "Applied Time Series Econometrics". set verbose off include SVAR.gfn open IS-LM.gdt --frompkg=SVAR set seed 1234 list X = q i m list Z = const time ISLM = SVAR_setup("AB", X, Z, 4) ISLM.horizon = 48 ### specify restrictions via pattern matrices matrix Arest = {1, NA, 0; NA, 1, NA; 0, 0, 1} SVAR_restrict(&ISLM, "A", Arest) matrix Brest = {NA, 0, 0; 0, NA, 0; 0, 0, NA} SVAR_restrict(&ISLM, "B", Brest) ISLM.snames = strsplit("eIS eLM eMS") SVAR_estimate(&ISLM) printf "Estimated contemporaneous impact matrix (x100) =\n%10.6f", \ 100 * ISLM.C set stopwatch rej = SVAR_boot(&ISLM, 2000, 0.95) printf "Elapsed time = %g\n", $stopwatch gpbuild Page185 loop col = 1 .. 3 loop row = 1 .. 3 IRFplot(&ISLM, row, col, 0) endloop endloop end gpbuild gridplot Page185 --output=display