Thanks, the bug should have only led to ghuu not being saved in oo_.dr at second order. As the results were simply missing, there was no crash or other noticeable effect.
-- Johannes Pfeifer Haußerstr. 29 72076 Tübingen Tel.: +49-(0)7071-6396184 Mobil.: +49-(0)170-6936820 Germany
-----Ursprüngliche Nachricht----- Von: dev-bounces@dynare.org [mailto:dev-bounces@dynare.org] Im Auftrag von Sébastien Villemot Gesendet: Mittwoch, 19. September 2012 10:51 An: List for Dynare developers Betreff: Re: [DynareDev] dyn_second_order_solver.m
"Johannes Pfeifer" jpfeifer@gmx.de writes:
I just fixed a bug in dyn_second_order_solver.m and pushed it to my repository. Could you please commit it and also port it to 4.3
Fix pushed, thanks.
I am not sure however of the exact impact of the bug. On a simple example (example1.mod) it seems to have no effect.
Could you also please have a look at the file. Line 198 reads
zud=[zeros(np,M_.exo_det_nbr);dr.ghud{1};gx(:,1:npred)*hud;zeros (M_.exo_nbr,M_.exo_det_nbr);eye(M_.exo_det_nbr)];
Matlab gives me a warning that gx is used before it is defined. I think this is another bug.
This is obviously a bug which affects exogenous deterministic variables at order 2. I don't know how to fix this, I leave it to Michel. I modified tests/example1_varexo_det.mod so that it tests 2nd order, in order not to forget this issue.
Finally, there are either missing parts or the file needs cleaning. Several variables seem to be defined, but are never used:
kad, kae, n2, n4, k0 in line 86, offset, kk in line 169, Gu and Guu in lines 172-173
I pushed a cleanup commit.
Thanks,
-- Sébastien Villemot Researcher in Economics http://www.dynare.org/sebastien Phone: +33-1-40-77-84-04