IRF inconsistent when using parameter

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

IRF inconsistent when using parameter

Postby kronegker » Wed May 16, 2012 4:18 pm

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!
Attachments
workertype_henry.mod
delta^(2-1)
(2.37 KiB) Downloaded 155 times
workertype_henrythetta.mod
delta^(thetta-1)
(2.38 KiB) Downloaded 152 times
kronegker
 
Posts: 3
Joined: Wed May 16, 2012 4:08 pm

Re: IRF inconsistent when using parameter

Postby jpfeifer » Wed May 16, 2012 6:17 pm

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.
Attachments
getPowerDeriv.m
(1.09 KiB) Downloaded 162 times
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: IRF inconsistent when using parameter

Postby kronegker » Wed May 16, 2012 7:13 pm

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!
kronegker
 
Posts: 3
Joined: Wed May 16, 2012 4:08 pm

Re: IRF inconsistent when using parameter

Postby jpfeifer » Thu May 17, 2012 7:18 am

I just noted the problem also affects higher orders. The file has been updated.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: IRF inconsistent when using parameter

Postby kronegker » Thu May 17, 2012 9:29 pm

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.
kronegker
 
Posts: 3
Joined: Wed May 16, 2012 4:08 pm

Re: IRF inconsistent when using parameter

Postby jpfeifer » Mon May 21, 2012 6:42 pm

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 5 guests

cron