Debian Codegraph @

tests/ecb/panel_var/panel_var_diff.mod

raw
1 // --+ options: json=compute +--
2
3 /* REMARK
4 ** ------
5 **
6 ** You need to have the first line on top of the mod file. The options defined on this line are passed
7 ** to the dynare command (you can add other options, separated by spaces or commas). The option defined
8 ** here is mandatory for the decomposition. It forces Dynare to output another representation of the
9 ** model in JSON file (additionaly to the matlab files) which is used here to manipulate the equations.
10 */
11
12 var
13 U2_Q_YED
14 U2_G_YER
15 U2_STN
16 U2_ESTN
17 U2_EHIC
18 DE_Q_YED
19 DE_G_YER
20 DE_EHIC
21 FR_Q_YED
22 FR_G_YER
23 FR_EHIC
24 IT_Q_YED
25 IT_G_YER
26 IT_EHIC
27 ES_Q_YED
28 ES_G_YER
29 ES_EHIC
30 NL_Q_YED
31 NL_G_YER
32 NL_EHIC
33 ;
34
35 varexo
36 res_U2_Q_YED
37 res_U2_G_YER
38 res_U2_STN
39 res_U2_ESTN
40 res_U2_EHIC
41 res_DE_Q_YED
42 res_DE_G_YER
43 res_DE_EHIC
44 res_FR_Q_YED
45 res_FR_G_YER
46 res_FR_EHIC
47 res_IT_Q_YED
48 res_IT_G_YER
49 res_IT_EHIC
50 res_ES_Q_YED
51 res_ES_G_YER
52 res_ES_EHIC
53 res_NL_Q_YED
54 res_NL_G_YER
55 res_NL_EHIC
56 ;
57
58 parameters
59 u2_q_yed_ecm_u2_q_yed_L1
60 u2_q_yed_ecm_u2_stn_L1
61 u2_q_yed_u2_g_yer_L1
62 u2_q_yed_u2_stn_L1
63 u2_g_yer_ecm_u2_q_yed_L1
64 u2_g_yer_ecm_u2_stn_L1
65 u2_g_yer_u2_q_yed_L1
66 u2_g_yer_u2_g_yer_L1
67 u2_g_yer_u2_stn_L1
68 u2_stn_ecm_u2_q_yed_L1
69 u2_stn_ecm_u2_stn_L1
70 u2_stn_u2_q_yed_L1
71 u2_stn_u2_g_yer_L1
72 u2_estn_u2_estn_L1
73 u2_ehic_u2_ehic_L1
74
75 de_q_yed_ecm_de_q_yed_L1
76 de_q_yed_ecm_u2_stn_L1
77 de_q_yed_de_g_yer_L1
78 de_q_yed_u2_stn_L1
79 de_g_yer_ecm_de_q_yed_L1
80 de_g_yer_ecm_u2_stn_L1
81 de_g_yer_de_q_yed_L1
82 de_g_yer_de_g_yer_L1
83 de_g_yer_u2_stn_L1
84 de_ehic_de_ehic_L1
85
86 fr_q_yed_ecm_fr_q_yed_L1
87 fr_q_yed_ecm_u2_stn_L1
88 fr_q_yed_fr_g_yer_L1
89 fr_q_yed_u2_stn_L1
90 fr_g_yer_ecm_fr_q_yed_L1
91 fr_g_yer_ecm_u2_stn_L1
92 fr_g_yer_fr_q_yed_L1
93 fr_g_yer_fr_g_yer_L1
94 fr_g_yer_u2_stn_L1
95 fr_ehic_fr_ehic_L1
96
97 it_q_yed_ecm_it_q_yed_L1
98 it_q_yed_ecm_u2_stn_L1
99 it_q_yed_it_g_yer_L1
100 it_q_yed_u2_stn_L1
101 it_g_yer_ecm_it_q_yed_L1
102 it_g_yer_ecm_u2_stn_L1
103 it_g_yer_it_q_yed_L1
104 it_g_yer_it_g_yer_L1
105 it_g_yer_u2_stn_L1
106 it_ehic_it_ehic_L1
107
108 es_q_yed_ecm_es_q_yed_L1
109 es_q_yed_ecm_u2_stn_L1
110 es_q_yed_es_g_yer_L1
111 es_q_yed_u2_stn_L1
112 es_g_yer_ecm_es_q_yed_L1
113 es_g_yer_ecm_u2_stn_L1
114 es_g_yer_es_q_yed_L1
115 es_g_yer_es_g_yer_L1
116 es_g_yer_u2_stn_L1
117 es_ehic_es_ehic_L1
118
119 nl_q_yed_ecm_nl_q_yed_L1
120 nl_q_yed_ecm_u2_stn_L1
121 nl_q_yed_nl_g_yer_L1
122 nl_q_yed_u2_stn_L1
123 nl_g_yer_ecm_nl_q_yed_L1
124 nl_g_yer_ecm_u2_stn_L1
125 nl_g_yer_nl_q_yed_L1
126 nl_g_yer_nl_g_yer_L1
127 nl_g_yer_u2_stn_L1
128 nl_ehic_nl_ehic_L1
129
130 ;
131
132 u2_q_yed_ecm_u2_q_yed_L1 = -0.82237516589315 ;
133 u2_q_yed_ecm_u2_stn_L1 = -0.323715338568976 ;
134 u2_q_yed_u2_g_yer_L1 = 0.0401361895021084 ;
135 u2_q_yed_u2_stn_L1 = 0.058397703958446 ;
136 u2_g_yer_ecm_u2_q_yed_L1 = 0.0189896046977421 ;
137 u2_g_yer_ecm_u2_stn_L1 = -0.109597659887432 ;
138 u2_g_yer_u2_q_yed_L1 = 0.0037667967632025 ;
139 u2_g_yer_u2_g_yer_L1 = 0.480506381923644 ;
140 u2_g_yer_u2_stn_L1 = -0.0722359286123494 ;
141 u2_stn_ecm_u2_q_yed_L1 = -0.0438500662608356 ;
142 u2_stn_ecm_u2_stn_L1 = -0.153283917138772 ;
143 u2_stn_u2_q_yed_L1 = 0.0328744983772825 ;
144 u2_stn_u2_g_yer_L1 = 0.292121949736756 ;
145 u2_estn_u2_estn_L1 = 1 ;
146 u2_ehic_u2_ehic_L1 = 1 ;
147
148 de_q_yed_ecm_de_q_yed_L1 = -0.822375165893149 ;
149 de_q_yed_ecm_u2_stn_L1 = -0.323715338568977 ;
150 de_q_yed_de_g_yer_L1 = 0.0401361895021082 ;
151 de_q_yed_u2_stn_L1 = 0.0583977039584461 ;
152 de_g_yer_ecm_de_q_yed_L1 = 0.0189896046977422 ;
153 de_g_yer_ecm_u2_stn_L1 = -0.109597659887433 ;
154 de_g_yer_de_q_yed_L1 = 0.00376679676320256;
155 de_g_yer_de_g_yer_L1 = 0.480506381923643 ;
156 de_g_yer_u2_stn_L1 = -0.0722359286123494 ;
157 de_ehic_de_ehic_L1 = 1 ;
158
159 fr_q_yed_ecm_fr_q_yed_L1 = -0.822375165893149 ;
160 fr_q_yed_ecm_u2_stn_L1 = -0.323715338568977 ;
161 fr_q_yed_fr_g_yer_L1 = 0.0401361895021082 ;
162 fr_q_yed_u2_stn_L1 = 0.0583977039584461 ;
163 fr_g_yer_ecm_fr_q_yed_L1 = 0.0189896046977422 ;
164 fr_g_yer_ecm_u2_stn_L1 = -0.109597659887433 ;
165 fr_g_yer_fr_q_yed_L1 = 0.00376679676320256;
166 fr_g_yer_fr_g_yer_L1 = 0.480506381923643 ;
167 fr_g_yer_u2_stn_L1 = -0.0722359286123494 ;
168 fr_ehic_fr_ehic_L1 = 1 ;
169
170 it_q_yed_ecm_it_q_yed_L1 = -0.822375165893149 ;
171 it_q_yed_ecm_u2_stn_L1 = -0.323715338568977 ;
172 it_q_yed_it_g_yer_L1 = 0.0401361895021082 ;
173 it_q_yed_u2_stn_L1 = 0.0583977039584461 ;
174 it_g_yer_ecm_it_q_yed_L1 = 0.0189896046977422 ;
175 it_g_yer_ecm_u2_stn_L1 = -0.109597659887433 ;
176 it_g_yer_it_q_yed_L1 = 0.00376679676320256;
177 it_g_yer_it_g_yer_L1 = 0.480506381923643 ;
178 it_g_yer_u2_stn_L1 = -0.0722359286123494 ;
179 it_ehic_it_ehic_L1 = 1 ;
180
181 es_q_yed_ecm_es_q_yed_L1 = -0.822375165893149 ;
182 es_q_yed_ecm_u2_stn_L1 = -0.323715338568977 ;
183 es_q_yed_es_g_yer_L1 = 0.0401361895021082 ;
184 es_q_yed_u2_stn_L1 = 0.0583977039584461 ;
185 es_g_yer_ecm_es_q_yed_L1 = 0.0189896046977422 ;
186 es_g_yer_ecm_u2_stn_L1 = -0.109597659887433 ;
187 es_g_yer_es_q_yed_L1 = 0.00376679676320256;
188 es_g_yer_es_g_yer_L1 = 0.480506381923643 ;
189 es_g_yer_u2_stn_L1 = -0.0722359286123494 ;
190 es_ehic_es_ehic_L1 = 1 ;
191
192 nl_q_yed_ecm_nl_q_yed_L1 = -0.822375165893149 ;
193 nl_q_yed_ecm_u2_stn_L1 = -0.323715338568977 ;
194 nl_q_yed_nl_g_yer_L1 = 0.0401361895021082 ;
195 nl_q_yed_u2_stn_L1 = 0.0583977039584461 ;
196 nl_g_yer_ecm_nl_q_yed_L1 = 0.0189896046977422 ;
197 nl_g_yer_ecm_u2_stn_L1 = -0.109597659887433 ;
198 nl_g_yer_nl_q_yed_L1 = 0.00376679676320256;
199 nl_g_yer_nl_g_yer_L1 = 0.480506381923643 ;
200 nl_g_yer_u2_stn_L1 = -0.0722359286123494 ;
201 nl_ehic_nl_ehic_L1 = 1 ;
202
203
204 model;
205
206 diff(U2_Q_YED) = u2_q_yed_ecm_u2_q_yed_L1 * (U2_Q_YED(-1) - U2_EHIC(-1))
207 + u2_q_yed_ecm_u2_stn_L1 * (U2_STN(-1) - U2_ESTN(-1))
208 + u2_q_yed_u2_g_yer_L1 * diff(U2_G_YER(-1))
209 + u2_q_yed_u2_stn_L1 * diff(U2_STN(-1))
210 + res_U2_Q_YED ;
211
212 diff(U2_G_YER) = u2_g_yer_ecm_u2_q_yed_L1 * (U2_Q_YED(-1) - U2_EHIC(-1))
213 + u2_g_yer_ecm_u2_stn_L1 * (U2_STN(-1) - U2_ESTN(-1))
214 + u2_g_yer_u2_q_yed_L1 * diff(U2_Q_YED(-1))
215 + u2_g_yer_u2_g_yer_L1 * diff(U2_G_YER(-1))
216 + u2_g_yer_u2_stn_L1 * diff(U2_STN(-1))
217 + res_U2_G_YER ;
218
219 diff(U2_STN) = u2_stn_ecm_u2_q_yed_L1 * (U2_Q_YED(-1) - U2_EHIC(-1))
220 + u2_stn_ecm_u2_stn_L1 * (U2_STN(-1) - U2_ESTN(-1))
221 + u2_stn_u2_q_yed_L1 * diff(U2_Q_YED(-1))
222 + u2_stn_u2_g_yer_L1 * diff(U2_G_YER(-1))
223 + res_U2_STN ;
224
225 U2_ESTN = u2_estn_u2_estn_L1 * U2_ESTN
226 + res_U2_ESTN ;
227
228 U2_EHIC = u2_ehic_u2_ehic_L1 * U2_EHIC
229 + res_U2_EHIC ;
230
231 diff(DE_Q_YED) = de_q_yed_ecm_de_q_yed_L1 * (DE_Q_YED(-1) - DE_EHIC(-1))
232 + de_q_yed_ecm_u2_stn_L1 * (U2_STN(-1) - U2_ESTN(-1))
233 + de_q_yed_de_g_yer_L1 * diff(DE_G_YER(-1))
234 + de_q_yed_u2_stn_L1 * diff(U2_STN(-1))
235 + res_DE_Q_YED ;
236
237 diff(DE_G_YER) = de_g_yer_ecm_de_q_yed_L1 * (DE_Q_YED(-1) - DE_EHIC(-1))
238 + de_g_yer_ecm_u2_stn_L1 * (U2_STN(-1) - U2_ESTN(-1))
239 + de_g_yer_de_q_yed_L1 * diff(DE_Q_YED(-1))
240 + de_g_yer_de_g_yer_L1 * diff(DE_G_YER(-1))
241 + de_g_yer_u2_stn_L1 * diff(U2_STN(-1))
242 + res_DE_G_YER ;
243
244 DE_EHIC = de_ehic_de_ehic_L1 * DE_EHIC
245 + res_DE_EHIC ;
246
247 diff(FR_Q_YED) = fr_q_yed_ecm_fr_q_yed_L1 * (FR_Q_YED(-1) - FR_EHIC(-1))
248 + fr_q_yed_ecm_u2_stn_L1 * (U2_STN(-1) - U2_ESTN(-1))
249 + fr_q_yed_fr_g_yer_L1 * diff(FR_G_YER(-1))
250 + fr_q_yed_u2_stn_L1 * diff(U2_STN(-1))
251 + res_FR_Q_YED ;
252
253 diff(FR_G_YER) = fr_g_yer_ecm_fr_q_yed_L1 * (FR_Q_YED(-1) - FR_EHIC(-1))
254 + fr_g_yer_ecm_u2_stn_L1 * (U2_STN(-1) - U2_ESTN(-1))
255 + fr_g_yer_fr_q_yed_L1 * diff(FR_Q_YED(-1))
256 + fr_g_yer_fr_g_yer_L1 * diff(FR_G_YER(-1))
257 + fr_g_yer_u2_stn_L1 * diff(U2_STN(-1))
258 + res_FR_G_YER ;
259
260 FR_EHIC = fr_ehic_fr_ehic_L1 * FR_EHIC
261 + res_FR_EHIC ;
262
263 diff(IT_Q_YED) = it_q_yed_ecm_it_q_yed_L1 * (IT_Q_YED(-1) - IT_EHIC(-1))
264 + it_q_yed_ecm_u2_stn_L1 * (U2_STN(-1) - U2_ESTN(-1))
265 + it_q_yed_it_g_yer_L1 * diff(IT_G_YER(-1))
266 + it_q_yed_u2_stn_L1 * diff(U2_STN(-1))
267 + res_IT_Q_YED ;
268
269 diff(IT_G_YER) = it_g_yer_ecm_it_q_yed_L1 * (IT_Q_YED(-1) - IT_EHIC(-1))
270 + it_g_yer_ecm_u2_stn_L1 * (U2_STN(-1) - U2_ESTN(-1))
271 + it_g_yer_it_q_yed_L1 * diff(IT_Q_YED(-1))
272 + it_g_yer_it_g_yer_L1 * diff(IT_G_YER(-1))
273 + it_g_yer_u2_stn_L1 * diff(U2_STN(-1))
274 + res_IT_G_YER ;
275
276 IT_EHIC = it_ehic_it_ehic_L1 * IT_EHIC
277 + res_IT_EHIC ;
278
279 diff(ES_Q_YED) = es_q_yed_ecm_es_q_yed_L1 * (ES_Q_YED(-1) - ES_EHIC(-1))
280 + es_q_yed_ecm_u2_stn_L1 * (U2_STN(-1) - U2_ESTN(-1))
281 + es_q_yed_es_g_yer_L1 * diff(ES_G_YER(-1))
282 + es_q_yed_u2_stn_L1 * diff(U2_STN(-1))
283 + res_ES_Q_YED ;
284
285 diff(ES_G_YER) = es_g_yer_ecm_es_q_yed_L1 * (ES_Q_YED(-1) - ES_EHIC(-1))
286 + es_g_yer_ecm_u2_stn_L1 * (U2_STN(-1) - U2_ESTN(-1))
287 + es_g_yer_es_q_yed_L1 * diff(ES_Q_YED(-1))
288 + es_g_yer_es_g_yer_L1 * diff(ES_G_YER(-1))
289 + es_g_yer_u2_stn_L1 * diff(U2_STN(-1))
290 + res_ES_G_YER ;
291
292 ES_EHIC = es_ehic_es_ehic_L1 * ES_EHIC
293 + res_ES_EHIC ;
294
295 diff(NL_Q_YED) = nl_q_yed_ecm_nl_q_yed_L1 * (NL_Q_YED(-1) - NL_EHIC(-1))
296 + nl_q_yed_ecm_u2_stn_L1 * (U2_STN(-1) - U2_ESTN(-1))
297 + nl_q_yed_nl_g_yer_L1 * diff(NL_G_YER(-1))
298 + nl_q_yed_u2_stn_L1 * diff(U2_STN(-1))
299 + res_NL_Q_YED ;
300
301 diff(NL_G_YER) = nl_g_yer_ecm_nl_q_yed_L1 * (NL_Q_YED(-1) - NL_EHIC(-1))
302 + nl_g_yer_ecm_u2_stn_L1 * (U2_STN(-1) - U2_ESTN(-1))
303 + nl_g_yer_nl_q_yed_L1 * diff(NL_Q_YED(-1))
304 + nl_g_yer_nl_g_yer_L1 * diff(NL_G_YER(-1))
305 + nl_g_yer_u2_stn_L1 * diff(U2_STN(-1))
306 + res_NL_G_YER ;
307
308 NL_EHIC = nl_ehic_nl_ehic_L1 * NL_EHIC
309 + res_NL_EHIC ;
310
311
312 end;
313
314 mydseries = dseries(randn(40,20), 1, {'U2_Q_YED', ...
315 'U2_G_YER', ...
316 'U2_STN', ...
317 'U2_ESTN', ...
318 'U2_EHIC', ...
319 'DE_Q_YED', ...
320 'DE_G_YER', ...
321 'DE_EHIC', ...
322 'FR_Q_YED', ...
323 'FR_G_YER', ...
324 'FR_EHIC', ...
325 'IT_Q_YED', ...
326 'IT_G_YER', ...
327 'IT_EHIC', ...
328 'ES_Q_YED', ...
329 'ES_G_YER', ...
330 'ES_EHIC', ...
331 'NL_Q_YED', ...
332 'NL_G_YER', ...
333 'NL_EHIC'});
334
335 pooled_ols(mydseries, ...
336 {'de','u2','fr', 'it', 'es', 'nl'}, ...
337 {'*_q_yed_ecm_*_q_yed_L1', ...
338 '*_q_yed_ecm_u2_stn_L1', ...
339 '*_q_yed_*_g_yer_L1', ...
340 '*_q_yed_u2_stn_L1', ...
341 '*_g_yer_ecm_*_q_yed_L1', ...
342 '*_g_yer_ecm_u2_stn_L1', ...
343 '*_g_yer_*_q_yed_L1', ...
344 '*_g_yer_*_g_yer_L1', ...
345 '*_g_yer_u2_stn_L1', ...
346 '*_ehic_*_ehic_L1'});