always genenrate same series of simulated data

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.

always genenrate same series of simulated data

Postby ZBCPA » Thu Dec 22, 2016 2:32 am

Dear Johannes,

I calibrate the std/persistence of shocks then run simulation of the model using code
Code: Select all
stoch_simul(orde=1,periods=500)
. Then I got 500 observations. I find that each time I run this process, it always generates exactly same 500 observations. I am a little confused since all shocks are i.i.d , does that mean in different simulation shocks values are randomly picked and should be different from each other in different simulation?

Kind regards,
Huan
ZBCPA
 
Posts: 101
Joined: Sat May 16, 2015 4:15 am

Re: always genenrate same series of simulated data

Postby jpfeifer » Thu Dec 22, 2016 7:59 am

For replicability, newer Dynare version set the seed of the random number generator. If you want different draws, use the
Code: Select all
set_dynare_seed

command (see the manual)
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 6 guests