Page 1 of 1

set_dynare_seed

PostPosted: Tue Apr 11, 2017 5:03 pm
by frolik
Hello everyone,

I am a bit puzzled by the function set_dynare_seed. In particular, it seems that if I have a model with more than one shock (say 2 shocks), the simulated shocks (in this case say with std=1) from dynare with set_dynare_seed('default') are different from the shocks generated by the lines:
rng('default')
randn(SimLength,M_.exo_nbr)

where the simulation lenght is the same.

When I have only one shock in the model, I don't find this difference.

Attached the sample code I'm using. Thanks a lot in advance for any comment

Re: set_dynare_seed

PostPosted: Tue Apr 11, 2017 5:41 pm
by jpfeifer
That has most probably to do with Dynare using
Code: Select all
randn(nxs,DynareOptions.periods)'

If you just have a vector, column and row order for filling the random number matrix are the same. With a matrix, it matters whether you fill it along rows or columns.