How to use simul_seed

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

How to use simul_seed

Postby emartinezgar » Sat Sep 16, 2006 9:09 am

Simul_seed is supposed to specify the seed for the random generator so as to obtain the same random sample at each run of the program (in a stochastic simulation). However, it is not clear to me how to use it and how to use either the EXPRESSION, the INTEGER or the DOUBLE.

Could you provide some examples or more guidance on this feature?. For instance, could you clarify if the simul_seed specifies the number of draws of the shocks to be saved for future simulations? Could you also indicate whether simul_seed must be specified equal to the number of periods of the simulation?

Any clarification on the role of thsi feature would be greatly appreciated.
emartinezgar
 
Posts: 4
Joined: Mon Sep 26, 2005 6:38 pm

Postby MichelJuillard » Mon Sep 18, 2006 3:33 pm

Look at Matlab's help on randn in order to understand the notion of 'state' of the random generator.
Option simul_seed sets the state of the random generator. You should provide an integer (or an expression in parentheses if you want to change the seed in a loop)

If you use option simul_seed with a fixed integer, then you will always get the same sequence of random numbers when you are running this program.

simul_seed has nothing to do with the number of iterations or the number of periods

Best

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 5 guests