MJDGGES error code 23 and Euler equation bug

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.

MJDGGES error code 23 and Euler equation bug

Postby adam_elbourne » Wed Jan 13, 2010 11:27 am

When running deterministic simulations in the mod file posted below I have noticed that I get MJDGGES error code 23 when the Euler equation contains variables raised to the power zero, if the power is a function of model parameters. If I manually replace the parameter names with their numerical values values the code works fine.

An example may clarify what I am trying to say here. If I have (1-l)^(1-phi) where phi = 1, then I get the error code. If I write (1-l)^(1-1) the code works fine.

In the attached mod file lines 98 to 103 contain equivalent Euler equations where some work and some don't. Comments in the code indicate which give the error code. I am using Dynare 4.1.0, although I think I ran across the same problem a couple of weeks ago with an older Dynare 4.

Thanks for your help.
Attachments
last_steady8b.pdf
This is a Matlab matrix with the initial conditions for the steady state. So the .pdf extension needs to be rewritten as .mat for it to work. Apologies that I posted a .mat file.
(451 Bytes) Downloaded 73 times
RA_forum.mod
(11.76 KiB) Downloaded 65 times
Adam Elbourne
Netherlands Bureau of Economic Policy Analysis (CPB)
adam_elbourne
 
Posts: 4
Joined: Tue Apr 15, 2008 12:03 pm

Re: MJDGGES error code 23 and Euler equation bug

Postby SébastienVillemot » Wed Jan 13, 2010 12:21 pm

Hi,

We are aware of this problem. For more technical background on that issue, see:
https://www.dynare.org/trac/ticket/78

Until we fix the problem, I suggest the following workaround:
* identify the parameters that appear in exponents of something which can equal to zero at some point in the simulation (for example, here "lab" equals 1, so 1-lab=0). Here we have at least parameter "phi".
* change the type of these parameters so that they become macro-variables. More precisely, remove them from the "parameters" statement, remove their initialization, and add something like:
Code: Select all
@#define phi = 1


See the macro-processor documentation for more details.

Best
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: MJDGGES error code 23 and Euler equation bug

Postby adam_elbourne » Wed Jan 13, 2010 12:37 pm

Thanks - I'll look into it.
Adam Elbourne
Netherlands Bureau of Economic Policy Analysis (CPB)
adam_elbourne
 
Posts: 4
Joined: Tue Apr 15, 2008 12:03 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 8 guests