IRIS to Dynare: get warnings

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.

IRIS to Dynare: get warnings

Postby Chan » Thu Jun 11, 2009 8:51 am

Hi,
I previously solved my model without any problem using IRIS. Now, I am trying to do the same using Dynare (please see the attached code) but I got several warnings such "Warning: Log of zero" and "Warning: Divide by zero". Any idea? Thanks in advance.
Chan

DSGEinDynare.mod
(2.96 KiB) Downloaded 186 times
Chan
 
Posts: 5
Joined: Tue Jun 02, 2009 8:27 am

Re: IRIS to Dynare: get warnings

Postby StephaneAdjemian » Mon Jun 15, 2009 1:04 pm

Hi Chan,

First, square brakets are not allowed in Dynare. So you have to change equations on line 41 and 50.

Second, Dynare uses a Newton algorithm to compute the steady state of the model. By default, the endogenous variables are are initialized at zero. In your case it's a problem because you have ratios of endogenous variables. So you have to change the initialization using the initval block, see the manual here.

Best, Stéphane.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: IRIS to Dynare: get warnings

Postby Chan » Tue Jun 16, 2009 6:32 am

Hi Stéphane,
I replaced the square brackets and inserted the initval block using the guess values, but still got warnings and error messages. So I tried setting the initial values using the steady state values I obtained from running the same model on IRIS but still got warnings and error messages. :|
Thank you so much for the response,
Chan
Attachments
BOTDSGEinDynare1.mod
(4.5 KiB) Downloaded 138 times
Chan
 
Posts: 5
Joined: Tue Jun 02, 2009 8:27 am

Re: IRIS to Dynare: get warnings

Postby StephaneAdjemian » Tue Jun 16, 2009 8:11 am

Hi Chan, Why do you initialize the endogenous variables with complex numbers? This is meaningless. You must initialize the endogenous variables with real variables. If this is the output obtained from IRIS, there must be a bug in this soft which should have warned you that he was unnable to find a (real) steady state. I tried to run the file by removing sqrt(-1) terms, but Dynare complains that he is unnable to find the steady state. Dynare (as IRIS I guess) uses a newton like algorithm to find the steady state. If the initial conditions (declared in the initval block) are too far from the steady state, this algorithm will often fail in finding the steady state.

The best practice is to solve for the steady state analytically and to provide this steady state (as a function of the deep parameters) to Dynare (you will find examples on the forum). If you cannot have the analytical solution, you will have to play with the initial conditions or you may also give a chance to homotopic methods (described here on www.dynare.org/DynareWiki).

Best, Stéphane.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: IRIS to Dynare: get warnings

Postby Chan » Tue Jun 16, 2009 9:35 am

Hi Stéphane,
I will try to do as you suggested. Thank you for responding to my questions so quickly. You have been very helpful!!!
Chan :D
Chan
 
Posts: 5
Joined: Tue Jun 02, 2009 8:27 am

Re: IRIS to Dynare: get warnings

Postby jaromirbenes » Sat Jul 25, 2009 4:23 pm

Hi Chan & Stephane:

I'm the creator of IRIS, so let me just explain the occurrence of complex numbers in the steady state of models solved by IRIS. IRIS allows the models to have balanced growth paths with any number of unit roots. In that case, the model's steady state is basically a snapshot of the system at an arbitrary time, and each variables must be described by two numbers: its level at that time, and its growth rate (constant over time). To this end, IRIS uses complex numbers, with the real part determining the level and the complex part determining the growth rate -- hence, in fact, it has nothing to do with complex numbers, it's just a convenient way how to carry two pieces of information using just one number.

Cheers,
Jaromir Benes
jaromirbenes
 
Posts: 1
Joined: Sat Jul 25, 2009 4:15 pm


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 10 guests