Debian Codegraph @

tests/identification/as2007/as2007_order_1_2_3.mod

raw
1 %this is the mod file used in replication files of An and Schorfheide (2007)
2 % modified to include some obvious and artificial identification failures
3 % and to check whether all kronflags are working
4 % created by Willi Mutschler (@wmutschl, [email protected])
5 % =========================================================================
6 % Copyright © 2019-2020 Dynare Team
7 %
8 % This file is part of Dynare.
9 %
10 % Dynare is free software: you can redistribute it and/or modify
11 % it under the terms of the GNU General Public License as published by
12 % the Free Software Foundation, either version 3 of the License, or
13 % (at your option) any later version.
14 %
15 % Dynare is distributed in the hope that it will be useful,
16 % but WITHOUT ANY WARRANTY; without even the implied warranty of
17 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 % GNU General Public License for more details.
19 %
20 % You should have received a copy of the GNU General Public License
21 % along with Dynare. If not, see <https://www.gnu.org/licenses/>.
22 % =========================================================================
23
24 var y R g z c dy p YGR INFL INT;
25 varobs y R g z c dy p YGR INFL INT;
26 varexo e_r e_g e_z;
27 parameters sigr sigg sigz tau phi psi1 psi2 rhor rhog rhoz rrst pist gamst nu cyst dumpy dumpyrhog;
28
29 rrst = 1.0000;
30 pist = 3.2000;
31 gamst= 0.5500;
32 tau = 2.0000;
33 nu = 0.1000;
34 kap = 0.3300;
35 phi = tau*(1-nu)/nu/kap/exp(pist/400)^2;
36 cyst = 0.8500;
37 psi1 = 1.5000;
38 psi2 = 0.1250;
39 rhor = 0.7500;
40 rhog = 0.9500;
41 rhoz = 0.9000;
42 sigr = 0.2;
43 sigg = 0.6;
44 sigz = 0.3;
45 dumpy = 0;
46 dumpyrhog = 1;
47
48 model;
49 #pist2 = exp(pist/400);
50 #rrst2 = exp(rrst/400);
51 #bet = 1/rrst2;
52 #gst = 1/cyst;
53 #cst = (1-nu)^(1/tau);
54 #yst = cst*gst;
55 1 = exp(-tau*c(+1)+tau*c+R-z(+1)-p(+1));
56 (1-nu)/nu/phi/(pist2^2)*(exp(tau*c)-1) = (exp(p)-1)*((1-1/2/nu)*exp(p)+1/2/nu) - bet*(exp(p(+1))-1)*exp(-tau*c(+1)+tau*c+dy(+1)+p(+1));
57 exp(c-y) = exp(-g) - phi*pist2^2*gst/2*(exp(p)-1)^2;
58 R = rhor*R(-1) + (1-rhor)*psi1*p + (1-rhor)*psi2*(y-g) + sigr*e_r;
59 g = dumpyrhog*rhog*g(-1) + sigg*e_g;
60 z = rhoz*z(-1) + sigz*e_z;
61 YGR = gamst+100*(dy+z);
62 INFL = pist+400*p;
63 INT = pist+rrst+4*gamst+400*R;
64 dy = y - y(-1);
65 end;
66
67 shocks;
68 var e_r = 0.6^2;
69 var e_g = 0.5^2;
70 var e_z = 0.4^2;
71 corr e_r, e_g = 0.3;
72 corr e_r, e_z = 0.2;
73 corr e_z, e_g = 0.1;
74 end;
75
76 steady_state_model;
77 z=0; g=0; c=0; y=0; p=0; R=0; dy=0;
78 YGR=gamst; INFL=pist; INT=pist+rrst+4*gamst;
79 end;
80
81 estimated_params;
82 tau, 2, 1e-5, 10, gamma_pdf, 2, 0.5;
83
84 %these parameters do not enter the linearized solution
85 cyst, 0.85, 1e-5, 0.99999, beta_pdf, 0.85, 0.1;
86 sigg, 0.6, 1e-8, 5, inv_gamma_pdf, 0.4, 4;
87 rhoz, 0.9, 1e-5, 0.99999, beta_pdf, 0.66, 0.15;
88 corr e_r,e_g, 0.3, 1e-8, 5, inv_gamma_pdf, 0.4, 4;
89 corr e_z,e_g, 0.3, 1e-8, 5, inv_gamma_pdf, 0.4, 4;
90 corr e_z,e_r, 0.3, 1e-8, 5, inv_gamma_pdf, 0.4, 4;
91
92 %these parameters could only be identified from the steady state of YGR INFL and INT, however, we observer y pi R instead
93 rrst, 1, 1e-5, 10, gamma_pdf, 0.8, 0.5;
94 gamst, 0.55, -5, 5, normal_pdf, 0.4, 0.2;
95 dumpy, 0, -10, 10, normal_pdf, 0, 1;
96
97 %these parameters jointly determine the slope kappa of the linearized new keynesian phillips curve
98 pist, 3.2, 1e-5, 20, gamma_pdf, 4, 2;
99 nu, 0.1, 1e-5, 0.99999, beta_pdf, 0.1, .05;
100 phi, 50, 1e-5, 100, gamma_pdf, 50, 20;
101
102 %these parameters are pairwise collinear as one should not use both formulations for the standard error of a shock
103 sigz, 0.3, 1e-8, 5, inv_gamma_pdf, 0.4, 4;
104 stderr e_z, 0.3, 1e-8, 5, inv_gamma_pdf, 0.4, 4;
105
106 %these parameters are pairwise collinear as they are multiplicative
107 rhog, 0.95, 1e-5, 0.99999, beta_pdf, 0.8, 0.1;
108 dumpyrhog, 1, -10, 10, normal_pdf, 1, 1;
109
110 %these parameters are jointly not identified due to the specification of the Taylor rule
111 psi1, 1.5, 1e-5, 10, gamma_pdf, 1.5, 0.25;
112 psi2, 0.125, 1e-5, 10, gamma_pdf, 0.5, 0.25;
113 rhor, 0.75, 1e-5, 0.99999, beta_pdf, 0.5, 0.2;
114 stderr e_r, 0.2, 1e-8, 5, inv_gamma_pdf, 0.3, 4;
115
116 end;
117
118 steady;
119 check;
120 stoch_simul(order=3,irf=0); %needed for identification(order=3)
121
122 @#for ORDER in [1, 2, 3]
123 @#for KRONFLAG in [-1, -2, 0]
124 fprintf('*** ORDER = @{ORDER} WITH ANALYTIC_DERIVATION_MODE=@{KRONFLAG} ***\n')
125 identification(order=@{ORDER}, parameter_set=calibration, grid_nbr=10,analytic_derivation_mode=@{KRONFLAG});
126 @#endfor
127 @#endfor