Page 1 of 1

Drawing from non-normal distributions(uniform)in simulation

PostPosted: Thu Sep 03, 2015 2:01 pm
by leonard007
Hi ,

I was trying to simulate (not estimate) a model with a shock which is not have normal distributions. Particularly I'd be interested in specifying that my shock is uniformly distributed(-1,1). (I'm also interested in truncated normals.)

I would like to figure out the best way to specify how to do this in the shocks; I use Dynar4.4.3.

Thanks for the help,

PS: I saw the http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=1855 but unfortunately it is just for [0 1] and also I could not find that line in the matlab file simult.m.

Re: Drawing from non-normal distributions(uniform)in simulat

PostPosted: Thu Sep 03, 2015 6:56 pm
by jpfeifer
At first order, you have to change line 83 of the simult.m in the Dynare/matlab folder, which reads
Code: Select all
        DynareResults.exo_simul(:,i_exo_var) = randn(nxs,DynareOptions.periods)'*chol_S;

to something like
Code: Select all
        DynareResults.exo_simul(:,i_exo_var) = 2*(rand(nxs,DynareOptions.periods)-0.5);

Due to certainty equivalence, it does not matter that the shocks you are drawing now have a different standard deviation than is used for computing the decision rules. At higher order, this approach would be wrong.