Drawing from non-normal distributions in model simulation

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.

Drawing from non-normal distributions in model simulation

Postby shwayder » Sat Sep 06, 2008 3:52 pm

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
shwayder
 
Posts: 7
Joined: Wed May 14, 2008 2:28 am
Location: Northwestern University

Re: Drawing from non-normal distributions in model simulatio

Postby StephaneAdjemian » Sun Sep 07, 2008 12:23 pm

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.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.


Return to Dynare help

Who is online

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