Page 1 of 1

Problems with solution algorithms, different MATLAB versions

PostPosted: Thu Sep 11, 2014 11:28 am
by ldraeger
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

Re: Problems with solution algorithms, different MATLAB vers

PostPosted: Sat Sep 13, 2014 7:26 am
by jpfeifer
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.

Re: Problems with solution algorithms, different MATLAB vers

PostPosted: Wed Sep 17, 2014 5:18 am
by jpfeifer
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.

Re: Problems with solution algorithms, different MATLAB vers

PostPosted: Wed Sep 17, 2014 7:18 am
by ldraeger
Dear Johannes,

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

Thanks again,

Lena