Page 1 of 1

Drawing from non-normal distributions in model simulation

PostPosted: Sat Sep 06, 2008 3:52 pm
by shwayder
Hi There,

I was trying to simulate (not estimate) a model and I want my shocks to not have normal distributions. Particularly I'd be interested in specifying that my shocks are uniformly distributed. (I'm also interested in truncated normals, but given a uniform random variable I can turn it into a truncated normal.)

I poked around the manual and the forum here but couldn't seem to figure out the best way to specify how to do this in the shocks; statement.

Thanks for the help,
AS

Re: Drawing from non-normal distributions in model simulatio

PostPosted: Sun Sep 07, 2008 12:23 pm
by StephaneAdjemian
Hi, There is no way in Dynare to simulate a stochastic model with non gaussian structural shocks. If you want to simulate a model with, say, uniform distributions for the structural shocks you have to change the matlab file simult.m (in the matlab directory). You just have to replace line 64:

Code: Select all
oo_.exo_simul(:,i_exo_var) = randn(M_.maximum_lag+M_.maximum_lead+options_.periods,nxs)*chol_S;


by something like

Code: Select all
oo_.exo_simul(:,i_exo_var) = rand(M_.maximum_lag+M_.maximum_lead+options_.periods,nxs);


for uniform distributions between 0 and 1.

Best,
Stéphane.