| 1 |
# Test script for the bugs with HDsave() and FEVDsave() discovered by Artur |
| 2 |
|
| 3 |
set verbose off |
| 4 |
|
| 5 |
# open the data and do some preliminary transformations |
| 6 |
open sw_ch14.gdt |
| 7 |
genr infl = 400*ldiff(PUNEW) |
| 8 |
rename LHUR unemp |
| 9 |
list X = unemp infl |
| 10 |
list Z = const |
| 11 |
|
| 12 |
# load the SVAR package |
| 13 |
include SVAR.gfn |
| 14 |
# set up the SVAR |
| 15 |
Mod = SVAR_setup("C", X, Z, 3) |
| 16 |
# Specify the constraints on C |
| 17 |
SVAR_restrict(&Mod, "C", 1, 2, 0) |
| 18 |
# Estimate |
| 19 |
SVAR_estimate(&Mod) |
| 20 |
|
| 21 |
# Save the historical decomposition as a list of series |
| 22 |
list HD_infl = SVAR_HD(&Mod, "infl") |
| 23 |
|
| 24 |
# Now the stuff that was failing before: |
| 25 |
# plot the historical decomposition for inflation |
| 26 |
HDsave("foo.pdf", &Mod, 2) |
| 27 |
FEVDsave("bar.pdf", &Mod, 2) |