News shock in Deterministic 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.

News shock in Deterministic Simulation

Postby bigbigben » Wed Mar 23, 2011 6:52 am

If I specify the technology shock as a_t = rho_a*a_t(-1)+ea and simulate the responses a news in a_t using simul rather than stoch_simul, is the following the right way to do it?

shocks;
var ea;
periods 1:2 ;
values 0.0 ;
var ea;
periods 3:3;
values .01 ;
var ea;
periods 4:1000;
values 0.00;
end;

//check;

It is suppose a news with regard to the technology after two periods.

However, Dynare gives an error message:

ERROR: JR_aer_unitroot.mod:112.0-114.18: shocks: variable ea declared twice

??? Error using ==> dynare at 96
DYNARE: preprocessing failed
simul(periods=10000);
bigbigben
 
Posts: 171
Joined: Sun May 28, 2006 1:19 am

Re: News shock in Deterministic Simulation

Postby jpfeifer » Wed Mar 23, 2011 8:21 am

Judging from the manual, it should be:

Code: Select all
shocks;
var ea;
periods 1:2 3 4:1000;
values 0.0 .01 0.0;


I also guess that you do not need the specify the periods where the shock is 0 as this should be the case by default. Hence

Code: Select all
shocks;
var ea;
periods3;
values .01;


might be sufficient
------------
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

Re: News shock in Deterministic Simulation

Postby bigbigben » Thu Mar 24, 2011 1:29 am

Hi, jpfeifer:

Thank you for the help. The code works now. Something interesting is that I cannot replicate the result in Jaimovich and Rebelo (2009 AER) with simul, but stoch_stimul result basically can generate co-movement between macro variables. if I use simul, there is dip of consumption when the shock is realized, and furthermore, the responses before period 3 are just zeros. I guess Dynare does not recognize the shock as a "news".
bigbigben
 
Posts: 171
Joined: Sun May 28, 2006 1:19 am

Re: News shock in Deterministic Simulation

Postby rteconomics » Wed Mar 28, 2012 4:27 pm

Hi! Would u be kindly willing to share your code? I'm working on a similar model and would be a great help.
THANKS!
R.
rteconomics
 
Posts: 41
Joined: Wed Jan 04, 2012 11:29 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 11 guests