Debian Codegraph @

tests/identification/as2007/as2007.mod

raw
1 % Model of An and Schorfheide (2007)
2 % Created by Marco Ratto (@rattoma, [email protected])
3 % =========================================================================
4 % Copyright © 2010-2020 Dynare Team
5 %
6 % This file is part of Dynare.
7 %
8 % Dynare is free software: you can redistribute it and/or modify
9 % it under the terms of the GNU General Public License as published by
10 % the Free Software Foundation, either version 3 of the License, or
11 % (at your option) any later version.
12 %
13 % Dynare is distributed in the hope that it will be useful,
14 % but WITHOUT ANY WARRANTY; without even the implied warranty of
15 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 % GNU General Public License for more details.
17 %
18 % You should have received a copy of the GNU General Public License
19 % along with Dynare. If not, see <https://www.gnu.org/licenses/>.
20 % =========================================================================
21
22 var pie $\pi$ y R g z YGR INFL INT;
23 varexo e_R $\varepsilon_R$ e_g e_z;
24 parameters tau $\tau$ kap $\kappa$ psi1 psi2 rhoR rhog rhoz rr_steady pi_steady gam_steady std_R std_g std_z;
25
26 tau = 2;
27 kap = 0.15;
28
29 psi1 = 1.5;
30 psi2 = 1;
31
32 rhoR = 0.96;
33 rhog = 0.95;
34 rhoz = 0.65;
35
36 rr_steady = 0.4;
37 pi_steady = 4.0;
38 gam_steady = 0.5;
39 std_R = 0.2;
40 std_g = 0.8;
41 std_z = 0.45;
42
43 model;
44 y = y(+1) + g - g(+1) - 1/tau*(R-pie(+1)-z(+1));
45 pie = 1/(1+rr_steady/400)*pie(+1)+kap*(y-g);
46 R = rhoR*R(-1)+(1-rhoR)*psi1*pie+(1-rhoR)*psi2*(y-y(-1)+z)+e_R*std_R;
47 g = rhog*g(-1)+e_g*std_g;
48 z = rhoz*z(-1)+e_z*std_z;
49 YGR = gam_steady+100*(y-y(-1)+z);
50 INFL = pi_steady+400*pie;
51 INT = pi_steady+rr_steady+4*gam_steady+400*R;
52 end;
53
54 steady_state_model;
55 pie=0;
56 y=0;
57 R=0;
58 g=0;
59 z=0;
60 YGR=gam_steady;
61 INFL = pi_steady;
62 INT = pi_steady+rr_steady+4*gam_steady;
63 end;
64
65 estimated_params;
66 tau, gamma_pdf, 2, 0.5;
67 kap, beta_pdf, 0.2, 0.1;
68 psi1, gamma_pdf, 1.5, 0.25;
69 psi2, gamma_pdf, 0.5, 0.25;
70 rhoR, beta_pdf, 0.5, 0.2;
71 rhog, beta_pdf, 0.8, 0.1;
72 rhoz, beta_pdf, 0.66, 0.15;
73 rr_steady, gamma_pdf, 0.8, 0.5;
74 pi_steady, gamma_pdf, 0.8, 0.5;
75 gam_steady, gamma_pdf, 0.8, 0.5;
76 std_R, inv_gamma_pdf, 0.05, inf;
77 std_g, inv_gamma_pdf, 0.05, inf;
78 std_z, inv_gamma_pdf, 0.05, inf;
79 end;
80
81 steady;
82 check;
83
84 varobs YGR INFL INT;
85
86 shocks;
87 var e_g;
88 stderr 1;
89 var e_R;
90 stderr 1;
91 var e_z;
92 stderr 1;
93 end;
94
95 identification(tex);
96 identification(tex,advanced=1,max_dim_cova_group=3,prior_mc=250,no_identification_spectrum, no_identification_minimal);
97
98 collect_latex_files;
99 [status, cmdout]=system(['pdflatex -halt-on-error -interaction=nonstopmode ' M_.fname '_TeX_binder.tex']);
100 if status
101 cmdout
102 error('TeX-File did not compile.')
103 end
104 close all;
105 identification(tex,advanced=0,max_dim_cova_group=3,prior_mc=50,grid_nbr=100);