Replicating on stochastic extended path

Hi dynare friends, I could succesfully run a simulation by means of the stochastic extended path in dynare. However, when I try to repeat this in order to compare different simulated time series of my model and to cumpute moments for them, it was not possible because dynare always generate the same simulated data for each itetarion. I did also used set_dynare_seed command but the results were the same.

Thanks for your help.


How did you invoke the set_dynare_seed?

Hi, as a matter of fact, I did invoke set_dynare_seed
as follows:

also as:
set_dynare_seed(‘i’), where “i” is the index for looping

always before the extended_path command.

thanks for your help Johannes


I would need to see the files in this case.

Hi Johannes, I am attaching the *.mod file.


rbcasym1g_simul.mod (9.2 KB)

in your mod-file

Hi Johannes, thanks for your answer, it is working fine, however, as I asked Dynere to simulate a large number of periods (200) for a large number of replications (500) something went wrong and dynare displayed a warning message:

Warning: No convergence of the (stochastic) perfect foresight solver (in period 14)!

It happaned during replication 81.

thanks in advanced.


That can happen. You need to investigate if this is just a matter of numerical problems or whether you have drawn a shock draw that does not have a solution. My advice would be that if this only happens in 1 out of 500 cases, simply discard this draws.