| 1 |
# variation of the sample script with named shocks |
| 2 |
|
| 3 |
set verbose off |
| 4 |
include SVAR.gfn |
| 5 |
open sw_ch14.gdt |
| 6 |
|
| 7 |
series infl = 400 * ldiff(PUNEW) |
| 8 |
rename LHUR unemp |
| 9 |
|
| 10 |
list X = unemp infl |
| 11 |
list Z = const |
| 12 |
|
| 13 |
Mod = SVAR_setup("C", X, Z, 3) |
| 14 |
|
| 15 |
# we're calling the two shocks "demand" and "supply" |
| 16 |
# after the assumption that a supply shock doesn't |
| 17 |
# affect unemployment instantaneously |
| 18 |
|
| 19 |
Mod.snames = defarray("demand", "supply") |
| 20 |
SVAR_namedrestrict(&Mod, "C", "unemp", "supply") |
| 21 |
|
| 22 |
Mod.horizon = 36 |
| 23 |
SVAR_estimate(&Mod) |
| 24 |
printf "Time (Cmodel) = %g\n", $stopwatch |
| 25 |
bfail = SVAR_boot(&Mod, 1024, 0.90) |
| 26 |
|
| 27 |
gpbuild Plots |
| 28 |
IRFplot(&Mod, 0, 0) |
| 29 |
end gpbuild |
| 30 |
|
| 31 |
gridplot Plots --output=display --width=1200 |
| 32 |
IRFsave("simpleCnamed.pdf", &Mod, 0, 0) # 0 means "all" |