Le mardi 06 août 2019 à 07:38 +0000, Willi Mutschler a écrit :
> indeed I want to evaluate all g1, g2, g3, and g4 files one after the
> other, so what would be the optimized way to do so in terms of
> temporary terms computation?
I think it is:
T = NaN(sum(M_.dynamic_tmp_nbr(1:5)));T = feval([M_.fname,
'.dynamic_g4_tt'], oo_.dr.ys(l), oo_.exo_steady_state', M_.params,
oo_.dr.ys, 1);g1 = feval([M_.fname, '.dynamic_g1'], T, oo_.dr.ys(l),
oo_.exo_steady_state', M_.params, oo_.dr.ys, 1, false);g2 =
feval([M_.fname, '.dynamic_g2'], T, oo_.dr.ys(l),
oo_.exo_steady_state', M_.params, oo_.dr.ys, 1, false);
g3 = feval([M_.fname, '.dynamic_g3'], T, oo_.dr.ys(l),
oo_.exo_steady_state', M_.params, oo_.dr.ys, 1, false);g4 =
feval([M_.fname, '.dynamic_g4'], T, oo_.dr.ys(l),
oo_.exo_steady_state', M_.params, oo_.dr.ys, 1, false);
The first two lines compute the temporary terms up to 4th order. The
last four lines computes the matrices that you're interested in. The
last argument equal to "false" means that temporary terms should not be
recomputed.
--
Sébastien Villemot
Economist at CEPREMAP
Dynare developer
http://sebastien.villemot.name
Hello all,
I was wondering how I can evaluate the dynamic g4 files? That is, after running a mod file with stoch_simul(order=4) the preprocessor creates
- dynamic.m
- dynamic_g1.m; dynamic_g1_nz.m; dynamic_g1_tt.m;
- dynamic_g2.m; dynamic_g2_nz.m; dynamic_g2_tt.m;
- dynamic_g3.m; dynamic_g3_nz.m; dynamic_g3_tt.m;
- dynamic_g4.m; dynamic_g4_tt.m;
Now I can evaluate the dynamic files up to third order using:
[~, g1, g2, g3] = feval([M_.fname,'.dynamic'], oo_.dr.ys(I), oo_.exo_steady_state', M_.params, oo_.dr.ys, 1);
g3 = unfold_g3(g3, length(oo_.dr.ys(I))+length(oo_.exo_steady_state')); %add symmetric elements
What is the correct command to get g4?
[~, g1, g2, g3, g4] = feval([M_.fname,'.dynamic'], oo_.dr.ys(I), oo_.exo_steady_state', M_.params, oo_.dr.ys, 1);
is not working. Also, is g4 without symmetric elements, i.e. will I need to write something like unfold_g4.m as well?
Thanks,
Willi
---
Dr. Willi Mutschler
willi(a)mutschler.eu
https://mutschler.eu
Westfälische Wilhelms-Universität
Institut für Ökonometrie und Wirtschaftsstatistik (Raum 305)
Am Stadtgraben 9
48143 Münster
Tel. +49 251 83-22954
Fax +49 251 83-22012
Sent with [ProtonMail](https://protonmail.com) Secure Email.