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.

simulation

Postby Hoyd » Wed May 14, 2008 10:37 am

Dear Prof. Juillard,

Am wondering here what could be the possible reasons that Dynare does not give any results for simulation? I have attached the mod file...

Another thing is, does dynare allow "2 states for an economy in each period", which means within the same period there are some agents who make decisions before shock happens and some make decisions after the shock is realized?

Thanks in advance!
Last edited by Hoyd on Thu May 15, 2008 2:59 pm, edited 1 time in total.
Hoyd
 
Posts: 7
Joined: Thu Jan 03, 2008 8:58 pm

Re: simulation

Postby StephaneAdjemian » Thu May 15, 2008 10:12 am

Hi,

By defaults Dynare computes a second order approximation. At the end of your mod file you write:

Code: Select all
stoch_simul(periods=2100);


so Dynare tries to compute the simulated moments with a second order approximation. The problem is that the stochastic simulation is diverging in your case (because the size of the shocks is too important, it's a well known issue with stochastic simulation of order k approximations when k>1). Consequently the simulated moments given by Dynare are NaNs (I used dynare version 4). You should try to reduce the variance of eh and ef or to reduce the number of simulations. You may also implement the prunning algorithm advocated by Chris Sims (you will find a matlab implementation on the home page of Martin Uribe, or you can look at the following post). You can also compute theoretical moments instead of simulated moments by replacing the last line by :

Code: Select all
stoch_simul;


But the second order moments of the second order approximation will be identical to the second order moments associated to the first order approximation.


Best,
Stéphane.


Hoyd wrote:Dear Prof. Juillard,

Am wondering here what could be the possible reasons that Dynare does not give any results for simulation? I have attached the mod file...

Another thing is, does dynare allow "2 states for an economy in each period", which means within the same period there are some agents who make decisions before shock happens and some make decisions after the shock is realized?

Thanks in advance!
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