Debian Codegraph @

tests/model_diagnostics/example2_block_model_diag.mod

raw
1 //test singular Jacobian check with block decomposition
2
3 /*
4 * Example 2 from F. Collard (2001): "Stochastic simulations with DYNARE:
5 * A practical guide" (see "guide.pdf" in the documentation directory).
6 */
7
8 /*
9 * Copyright © 2001-2010 Dynare Team
10 *
11 * This file is part of Dynare.
12 *
13 * Dynare is free software: you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation, either version 3 of the License, or
16 * (at your option) any later version.
17 *
18 * Dynare is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with Dynare. If not, see <https://www.gnu.org/licenses/>.
25 */
26
27
28 var y, c, k, a, h, b;
29 varexo e, u;
30
31 parameters beta, rho, alpha, delta, theta, psi, tau;
32
33 alpha = 0.36;
34 rho = 1;
35 tau = 0;
36 beta = 0.99;
37 delta = 0.025;
38 psi = 0;
39 theta = 2.95;
40
41 model(block);
42 exp(c)*theta*exp(h)^(1+psi)=(1-alpha)*exp(y);
43 exp(k) = beta*(((exp(b)*exp(c))/(exp(b(+1))*exp(c(+1))))
44 *(exp(b(+1))*alpha*exp(y(+1))+(1-delta)*exp(k)));
45 exp(y) = exp(a)*(exp(k(-1))^alpha)*(exp(h)^(1-alpha));
46 exp(k) = exp(b)*(exp(y)-exp(c))+(1-delta)*exp(k(-1));
47 a = rho*a(-1)+tau*b(-1) + e;
48 b = tau*a(-1)+rho*b(-1) + u;
49 end;
50
51 initval;
52 y = 0.1;
53 c = -0.2;
54 h = -1.2;
55 k = 2.4;
56 a = 0;
57 b = 0;
58 e = 0;
59 u = 0;
60 end;
61
62 steady;
63 model_diagnostics;