LastSeets.file: Does dynare use it during the MCMC?

Good morning,
I was wondering what the role of the LastSeeds.file1. is? Does dynare use this file at all during the MCMC? Or is it simply there for information purposes?

Here is what I am trying to doI am trying to restart an MCMC which did not finish successfully, within dynare 4.5.7 where mh_recover dos not work. The MCMC run which did not finish was a continuation of a successfully finished MCMC. I would like to use the draws of the completed MCMC.

The aborted run added lines to the _mhx_blcky.mat files. Those lines I can simply delete I think (so that the total number of lines of chain y added across _mhx_blcky.mat the ads up to the total number of draws of)? Proceeding like this seems to “work” in the sense that dynare was able to load the draws and now appears to continue the chain. But what is the importance of the LastSeeds.file1? Would I need to modify this as well…?

Many thanks!

When I delete the Last.Seedsfile and launch the computation (with the _mhx_blcky.mat files modified as described above) it runs, but will the result be valid…?

Where exactly did you find this file?

I am sorry I was imprecise: It is a structure (not a file), in each of the _mhx_blcky.mat … files, which located in the metropolis folder.

For instance this one: (10.2 KB)

I see. The point here is to save the seed of the random number generator. Say you run a chain with 100 draws and there are 50 saved in each MH-file. Now you get a crash after draw 51 and want to use mh_recover. If we did not save the seed and load it, the MCMC would continue at draw 51 with the random numbers used for draw 1. That way, if you instead reran the estimation from draw 1, you would get a different result due to a different sequence of random numbers.

That being said, it is not essential, unless you care about perfect replicability of your results.

1 Like