Random Number Generator!

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.

Random Number Generator!

Postby zhaoningru » Sun Sep 28, 2014 8:58 pm

When I simulated a stochastic model by using DYNARE stoch_simul each time, I got the same result. I do not think the result is reasonable since the result should change because the random exogenous process. Thus, I put rng('shuffle') before "var" in DYNARE code and the result for each simulation did change. However, I got confused when read the random number generator in DYARE that says keep random sample the same in each simulation. Does it mean that each simulation should have the same result? Also, when I use DYNARE++ to carry out simulation, I got the same result every time. Again, I did not think it is reasonable outcome. If someone knows this part, please clarify my mind. If my understanding is correct, please also tell me how to generate different outputs in DYNARE++ in each simualtion. Thanks!
zhaoningru
 
Posts: 21
Joined: Sat Mar 29, 2014 8:16 pm

Re: Random Number Generator!

Postby jpfeifer » Mon Sep 29, 2014 5:29 am

Everything you need to know is in the manuals. See the Dynare++ manual for the
Code: Select all
--seed

option and the Dynare manual on the
Code: Select all
set_dynare_seed

command.
------------
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: No registered users and 4 guests

cron