Page 1 of 1

Seeding stochastic simulations

PostPosted: Thu Jul 13, 2006 11:54 am
by etanner
Hello,
I would like to know how to ensure that the series of random terms that come from a stochastic simulation (stoch_simul) will be the same in different runs.
In other programs (i.e. rats) this is ensured by specifying a specific value for a seed (i.e. seed = xxxxx).
In MATLAB, this function is apparently called "state" (i.e. state=xxxx).
I tried the MATLAB "state" command in a DYNARE program. The command DID compile --- but the desired result was not obtained, since sucessive runs of a same stochastic simulation program (essentiall Collard/Julliard's '03 example) yielded different realizations of the randomly genrated shocks.
Is this solvable?
Thanks
Evan in DC

PostPosted: Fri Jul 14, 2006 4:05 pm
by MichelJuillard
look at option simul_seed in the manual.

The matlab command is randn('state', ...)

Best

Michel