Problems with solution algorithms, different MATLAB versions

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.

Problems with solution algorithms, different MATLAB versions

Postby ldraeger » Thu Sep 11, 2014 11:28 am

Hi,

my co-author and I are working on a Dynare model with the same version (4.4.3), but different MATLAB versions (I have version R2013a, he's got R2010a). The problem we have is that I frequently get error messages that Dynare can't find the steady state or that the model is indeterminate, whereas my co-author is able to solve the same .mod file on his computer. It happens with different solvers and we're both not aware of having changed any tolerance parameters or other settings. We've checked the settings for fsolve in MATLAB and they were identical except for those of DiffMinChange and DiffMaxChange, for which my settings were 0 and Inf and his are 1e-08 and 0.1. However, changing that didn't help.

Does anyone have any idea what the problem might be? It seems that my computer has stricter tolerances in the solution algorithms, but I'm not sure where to change that since it happens with different solvers implemented in Dynare.

Thanks in advance for any advice!

Lena
ldraeger
 
Posts: 2
Joined: Thu Sep 11, 2014 9:13 am

Re: Problems with solution algorithms, different MATLAB vers

Postby jpfeifer » Sat Sep 13, 2014 7:26 am

Dear Lena,

could you provide me with a sample code? In addition, I would need more information on the machines you are using. Use
Code: Select all
ver

and
Code: Select all
dynare_version

in Matlab to extract the required info. Just send me an email with everything.

Something that has changed between Matlab versions is the random number generator. So depending on the routines you use, the results may differ. But as you are referring to fsolve, this should not matter.
------------
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: Problems with solution algorithms, different MATLAB vers

Postby jpfeifer » Wed Sep 17, 2014 5:18 am

Dear Lena,
I checked your files. The difference comes from the fact that you are using a 64bit version and your coauthor is using 32bit. Usually this does not matter. But your model has a singularity problem. In this case, the solution and the solution algorithms are very sensitive to small changes as the problem is unstable. The 64bit version due to being 64bit by default has a higher precision and this shows.

That being said, there is no unique solution for your model and which solution the solvers pick is arbitrary in any case. Thus, you need to fix the underlying problem. Even if you currently get the model to run (on my machine, depending on the solver the BK conditions are sometimes satisfied and sometimes not), you cannot trust the results. Take the singularity serious. The only case where you are allowed to have singularity warnings is when having unit roots.
------------
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: Problems with solution algorithms, different MATLAB vers

Postby ldraeger » Wed Sep 17, 2014 7:18 am

Dear Johannes,

many thanks, that helps clarifying things a lot! We're aware of the singularity problem and working on it.

Thanks again,

Lena
ldraeger
 
Posts: 2
Joined: Thu Sep 11, 2014 9:13 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 4 guests

cron