Drawing from non-normal distributions(uniform)in 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(uniform)in simulation

Postby leonard007 » Thu Sep 03, 2015 2:01 pm

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.
leonard007
 
Posts: 54
Joined: Tue May 26, 2015 12:30 pm

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

Postby jpfeifer » Thu Sep 03, 2015 6:56 pm

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.
------------
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 8 guests