Debian Codegraph @

tests/estimation/tune_mh_jscale/fs2000.inc

raw
1 /*
2 * Copyright © 2004-2020 Dynare Team
3 *
4 * This file is part of Dynare.
5 *
6 * Dynare is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Dynare is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Dynare. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20 var m P c e W R k d n l gy_obs gp_obs y dA;
21 varexo e_a e_m;
22
23 parameters alp bet gam mst rho psi del;
24
25 alp = 0.33;
26 bet = 0.99;
27 gam = 0.003;
28 mst = 1.011;
29 rho = 0.7;
30 psi = 0.787;
31 del = 0.02;
32
33 model;
34 dA = exp(gam+e_a);
35 log(m) = (1-rho)*log(mst) + rho*log(m(-1))+e_m;
36 -P/(c(+1)*P(+1)*m)+bet*P(+1)*(alp*exp(-alp*(gam+log(e(+1))))*k^(alp-1)*n(+1)^(1-alp)+(1-del)*exp(-(gam+log(e(+1)))))/(c(+2)*P(+2)*m(+1))=0;
37 W = l/n;
38 -(psi/(1-psi))*(c*P/(1-n))+l/n = 0;
39 R = P*(1-alp)*exp(-alp*(gam+e_a))*k(-1)^alp*n^(-alp)/W;
40 1/(c*P)-bet*P*(1-alp)*exp(-alp*(gam+e_a))*k(-1)^alp*n^(1-alp)/(m*l*c(+1)*P(+1)) = 0;
41 c+k = exp(-alp*(gam+e_a))*k(-1)^alp*n^(1-alp)+(1-del)*exp(-(gam+e_a))*k(-1);
42 P*c = m;
43 m-1+d = l;
44 e = exp(e_a);
45 y = k(-1)^alp*n^(1-alp)*exp(-alp*(gam+e_a));
46 gy_obs = dA*y/y(-1);
47 gp_obs = (P/P(-1))*m(-1)/dA;
48 end;
49
50 shocks;
51 var e_a; stderr 0.014;
52 var e_m; stderr 0.005;
53 end;
54
55 steady_state_model;
56 dA = exp(gam);
57 gst = 1/dA;
58 m = mst;
59 khst = ( (1-gst*bet*(1-del)) / (alp*gst^alp*bet) )^(1/(alp-1));
60 xist = ( ((khst*gst)^alp - (1-gst*(1-del))*khst)/mst )^(-1);
61 nust = psi*mst^2/( (1-alp)*(1-psi)*bet*gst^alp*khst^alp );
62 n = xist/(nust+xist);
63 P = xist + nust;
64 k = khst*n;
65
66 l = psi*mst*n/( (1-psi)*(1-n) );
67 c = mst/P;
68 d = l - mst + 1;
69 y = k^alp*n^(1-alp)*gst^alp;
70 R = mst/bet;
71 W = l/n;
72 ist = y-c;
73 q = 1 - d;
74
75 e = 1;
76
77 gp_obs = m/dA;
78 gy_obs = dA;
79 end;
80
81 steady;
82
83 check;
84
85 estimated_params;
86 alp, beta_pdf, 0.356, 0.02;
87 bet, beta_pdf, 0.993, 0.002;
88 gam, normal_pdf, 0.0085, 0.003;
89 mst, normal_pdf, 1.0002, 0.007;
90 rho, beta_pdf, 0.129, 0.100;
91 psi, beta_pdf, 0.65, 0.05;
92 del, beta_pdf, 0.01, 0.005;
93 stderr e_a, inv_gamma_pdf, 0.035449, inf;
94 stderr e_m, inv_gamma_pdf, 0.008862, inf;
95 end;
96
97 varobs gp_obs gy_obs;