Debian Codegraph @

addons/SVAR/examples/Traditional/BlQuah_plus_shortrun.inp

raw
1 set verbose off
2 include SVAR.gfn
3 open BlQuah.gdt --frompkg=SVAR
4
5 list X = DY U
6 list exog = const time
7 maxlag = 8
8
9 # set up the model
10 BQModel = SVAR_setup("C", X, exog, maxlag)
11 BQModel.horizon = 40
12
13 # set up the long-run restriction
14 SVAR_restrict(&BQModel, "lrC", 1, 2, 0)
15
16 # set up the short-run restriction
17 SVAR_restrict(&BQModel, "C", 1, 1, 0)
18
19 # name the shocks to something meaningful
20 BQModel.snames = defarray("Supply", "Demand")
21
22 # cumulate the IRFs for variable 1
23 SVAR_cumulate(&BQModel, 1)
24
25 # perform estimation
26 SVAR_estimate(&BQModel)
27
28 ### same thing with "pattern matrix" restrictions
29
30 BQ2 = SVAR_setup("C", X, exog, maxlag)
31 BQ2.horizon = 40
32
33 # set up the long-run restriction
34 SVAR_restrict(&BQ2, "lrC", {NA, 0; NA, NA})
35
36 # set up the short-run restriction
37 SVAR_restrict(&BQ2, "C", {0, NA; NA, NA})
38
39 BQModel.snames = defarray("Supply", "Demand")
40 SVAR_cumulate(&BQ2, 1)
41 SVAR_estimate(&BQ2)
42
43