Why isn't 'bootstrp' working?

I have written some codes to run DSGE model twice in Dynare and then do some bootstrapping.

Since I installed the new version 4.3.0, I noticed that the ‘bootstrp’ command in matlab give me the same bootstrapping result all the time.

I think it is due to some of functions in Dynare are intervening with original matlab commands. But I have no idea how to find them out and whether I could delete them without causing further problems.

Has anyone come across this problem before? and find out what are the causes? Please help me!!!

Thanks a lot.

I tried 4.1.2 version, 4.2.4 version and 4.3.1 version. Only 4.1.2 version would give me changing bootstrapping result.

I also rewrite the code using randi(n,n,1) to generate single bootstrapped indexes. It only works under 4.1.2 version as well.

is there a bug in newer version of Dynare?

Thanks in advance.


There is no “bootstrp” command in Dynare, so I don’t really know what you are talking about.

However, what may be relevant to your problem is the fact that recent versions of Dynare are deliberately resetting the random number generation at every run. The idea is to have identical estimation results across runs of Dynare. The drawback is that people who were used to run Dynare several times to get different stochastic simulation results have to adapt their code. You can use the “set_dynare_seed” command to use a different seed for the random number generator across your runs of Dynare.

You could try to define a new randon number stream that you use for bootstrapping. That way, you would not use the default stream that is reset by Dynare for reproducability of results.