851
Comment:
|
1165
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= Fixing randon seed = | = Fixing random seed = |
Line 3: | Line 3: |
* It is desirable that the default behavior of Dynare be fully deterministic: two runs of the same *.mod file on the same installation should provide the same results. * The seed of both uniform and normal random generator is to be fixed in global_initialization.m * Each Dynare command that uses a random generator must have an option letting the user use a different fixed seed or a variable seed based on time for example. |
It is desirable that the default behavior of Dynare be fully deterministic: two runs of the same *.mod file on the same installation should provide the same results. Introduced in commit db54c2d76ec8ac6a42c0cbf99bc394f7644f2a85 (git master), there is a new matlab routine for setting the seed: set_dynare_seed.m. This routine is called in global_initialization.m, so that each instance of dynare is initialized with the same seed (and should give exactly the same results). This routine can also be called in a mod file, depending on the version of matlab the user can set the seed and (with ver('matlab')>=7.7) choose the algorithm used to generate uniform variates (see matlab documentation or the output of the command !RandStream.list). |
Line 7: | Line 5: |
== List of commands or functions that use a random generator == | === List of commands or functions that use a random generator === |
Fixing random seed
It is desirable that the default behavior of Dynare be fully deterministic: two runs of the same *.mod file on the same installation should provide the same results. Introduced in commit db54c2d76ec8ac6a42c0cbf99bc394f7644f2a85 (git master), there is a new matlab routine for setting the seed: set_dynare_seed.m. This routine is called in global_initialization.m, so that each instance of dynare is initialized with the same seed (and should give exactly the same results). This routine can also be called in a mod file, depending on the version of matlab the user can set the seed and (with ver('matlab')>=7.7) choose the algorithm used to generate uniform variates (see matlab documentation or the output of the command RandStream.list).
List of commands or functions that use a random generator
- stoch_simul (csolve simult_ + currently call to dynare_simul_ uses a fixed seed)
- estimation
- mode optimization
- Metropolis iterations
- subsampling for posterior statistics
- osr optimization
- steady (csolve)
- ramsey_policy (csolve + simult_)
- Markov switching
- Global Sensitivity Analysis