Same Matlab/Dynare different Results


I am running a Bayesian estimation and I get different results after the mode computation (mode_compute=4) on two different computers running Matlab2017a and Dynare 4.5.3.

The results I get on the two computers are always different.

To be sure, I have set:


Which is the default, on both machines. Is there any other source of randomness I should take into account?

Thank you!

Hi, Normally the seed should be the same on each run of Dynare (even without the set_dynare_seed command). Did you check if you obtain the same results with a purely deterministic optimization algorithm (for instance with mode_compute equal to 7 or 8).


Thank you so much for your reply.

With mode_compute=4 I do get the same results for each run on the same computer, but I get different results if I run the optimization on two different computers. I will check with mode_compute 7 or 8 and let you know.

Thank you.

Do the two computers use the same operating system?

No, the two computers use Windows 7 and 10.

Could that be the cause?

In any case, I will test the deterministic optimizations and the same code on two computers running the same OS and let you know the results.

Thank you.

Are both Windows versions 64 bit?

Yes, both windows are 64 bit.

The try a different mode-finder, please. @stepan-a I had a similar thing with mode_compute=4 before, but could not find the source of the difference even after hours of debugging.

Thank you so much.

I actually get different results also with mode_compute=7 and mode_compute=8.

What I just noticed is that also the eigenvalues very close to zero as well as the explosive ones have different values on the two PC.

Could that be something related to the numerical aproximation?

Thanks for experimenting. Even if you are using the same matlab version, it could be that different libraries are used depending on the version OS. This could explain the discrepancies. It would be interesting to see the magnitude of the difference in likelihood evaluations (just by computing the likelihood on a common calibrated set of parameters) and also on the reduced form models (oo_.dr). It’s difficult to do that on my side…