Page 1 of 1

IRF inconsistent when using parameter

PostPosted: Wed May 16, 2012 4:18 pm
by kronegker
Hello,

I have a program where it solves a stochastic model and generates IRF. In line 48 of the file "workertype_henry", I used delta^(2-1). However, when I changed the code to delta^(thetta-1) where thetta is a parameter equals to 2, I get a different IRF result (figure 1, response to eta shock) which is shown in the file "workertype_henrythetta". I've been starting at the code for more than a day but I couldn't figure out why changing from "2" to "thetta" could yield a drastic result in the IRF. Does anyone know why this could be the case? I am using Dynare 4.2.5. Thank you in advance for all your help!

Re: IRF inconsistent when using parameter

PostPosted: Wed May 16, 2012 6:17 pm
by jpfeifer
This is a rare bug.
Please replace the Dynare 4.2.5 file from the Matlab folder with the attached one. Sorry for the inconvenience.

Re: IRF inconsistent when using parameter

PostPosted: Wed May 16, 2012 7:13 pm
by kronegker
I replaced the Dynare 4.2.5 file from the Matlab folder with the file you attached. The two codes now produce the same IRFs. Thank you so much for your help!

Re: IRF inconsistent when using parameter

PostPosted: Thu May 17, 2012 7:18 am
by jpfeifer
I just noted the problem also affects higher orders. The file has been updated.

Re: IRF inconsistent when using parameter

PostPosted: Thu May 17, 2012 9:29 pm
by kronegker
Hi jpfeifer,

Does the current "getPowerDeriv.m" file that you posted on this thread reflect the changes for higher orders as well? I compared the Impulse responses using "workertype_henrythetta.mod" when theta=4 and when theta==6 (theta can't be odd number), and they are numerically identical which intuitively shouldn't be the case. Thanks again for your help.

Re: IRF inconsistent when using parameter

PostPosted: Mon May 21, 2012 6:42 pm
by jpfeifer
For higher orders (i.e. stoch_simul(order=3)) there seems to be the same problem in the C++-files used. Fixing this is not so easy as these files need to be compiled. A fixed version will most probably appear tomorrow or so in the unstable Dynare version.