Help with "MJDGGES returns the following error code5"

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.

Help with "MJDGGES returns the following error code5"

Postby Rafael » Wed May 20, 2009 7:45 pm

Dear Dynare people,

I have been trying to update a mod file I used to run with Dynare 3--it worked fine--but now (with Dynare 4) I keep getting the error code posted in the subject line.

Your help would be greatly appreciated.

Regards,

- Rafael
Attachments
simple_model.zip
(7.66 KiB) Downloaded 263 times
Rafael
 
Posts: 3
Joined: Wed Jul 11, 2007 10:09 pm
Location: washington DC

Re: Help with "MJDGGES returns the following error code5"

Postby StephaneAdjemian » Tue May 26, 2009 8:40 am

Hi Rafael,

The error message is very unclear... The problem is that you cannot, with dynare version 4, assign values to the deep parameters by loading a mat file (because the preprocessor does not read the mat file). As a consequence M_.params, which should contain the values of the deep parameters, is filled with NaNs.

You have to specify explicitly the values of the deep parameters in the mod file. Another workaround is to replace:

Code: Select all
load second_paper_params.mat;


by

Code: Select all
load second_paper_params.mat;
for i=1:length(M_.params)
    deep_parameter_name = M_.param_names(i,:);
    eval(['M_.params(i)  = ' deep_parameter_name ' ;'])
end


You have to remove the unused declared parameters phipi and kappam, otherwise the loop will crash.

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: Help with "MJDGGES returns the following error code5"

Postby Rafael » Wed May 27, 2009 7:37 pm

Stéphane,

Many thanks for your help, the code works fine now.

Regards,

- Rafael
Rafael
 
Posts: 3
Joined: Wed Jul 11, 2007 10:09 pm
Location: washington DC

Re: Help with "MJDGGES returns the following error code5"

Postby Dubs » Sat Aug 01, 2009 12:37 pm

Thanks a lot, it's a very useful trick.
Dubs
 
Posts: 3
Joined: Mon Jul 27, 2009 2:54 pm


Return to Dynare help

Who is online

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