Does deterministic simulation break down in version 4?

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.

Does deterministic simulation break down in version 4?

Postby pabalo » Thu Jul 23, 2009 8:01 pm

When I do a determistic simulation en version 3 of dynare, the model runs perfectly, but when I want to run the same model with all the same spectications in version 4, the simulation breaks down. However, if I change manually the parser the number 1, the model runs (When I run it normally, the ones in bold don't appear.

% HISTVAL instructions
%
oo_.endo_simul( 3, M_.maximum_lag +1 -1) = 0.00350370;
oo_.endo_simul( 2, M_.maximum_lag +1 -1) = 0.01443718;
oo_.endo_simul( 5, M_.maximum_lag +1 -1) = 0.06544927;
oo_.endo_simul( 4, M_.maximum_lag +1 -1) = 0.00350370;
oo_.endo_simul( 7, M_.maximum_lag +1 -1) = (-0.00718412);
oo_.endo_simul( 1, M_.maximum_lag +1 -1) = (-0.01436690);
oo_.endo_simul( 6, M_.maximum_lag +1 -1) = (-0.00677433);
oo_.endo_simul( 10, M_.maximum_lag +1 -1) = 0;
oo_.endo_simul( 9, M_.maximum_lag +1 -1) = 0;
oo_.endo_simul( 11, M_.maximum_lag +1 -1) = 0;
oo_.endo_simul( 8, M_.maximum_lag +1 -1) = 0;
options_.periods = 50;
options_.simul = 1;
simul(oo_.dr);


I would appreciate if you could help me with this problem.

THANKS

The model is attached.
Attachments
model.mod
(2.28 KiB) Downloaded 83 times
pabalo
 
Posts: 3
Joined: Fri Dec 05, 2008 5:22 pm

Re: Does deterministic simulation break down in version 4?

Postby SébastienVillemot » Tue Aug 25, 2009 1:05 pm

Hi,

You are using the wrong timing for variables in the "histval" block. The first period before simulation starts has date 0, not date -1.

See:
http://www.dynare.org/manual/re13.html

I'm suprised that your code works under Dynare v3, because as far as I know the timing convention has not changed between v3 and v4.

Best,
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: Does deterministic simulation break down in version 4?

Postby pabalo » Fri Aug 28, 2009 6:46 pm

Sébastien Villemot, first of all, thank you very much for replying my question.

I would like to make some comments.
As you said about the timing of lags, in versión 4, I change the lags of the variables to time (0) and the model runs perfectly. But, if I use this lag (0) in version 3, the model runs, but the outcomes are incorrect. In version 3, the models runs well only if I use (-1) as the lags of variables. So, I think, there is a differece between version 3 and 4 about the timing for lags.

I send you the model with the two blocks of lagged variables and an excel file which contains the simulation in version 3 and version 4, and the difference between both outputs.

Running the model in both version you could see the difference I have mentioned.

Thanks again for your help.

Pablo
Attachments
model_output.xls
(133 KiB) Downloaded 87 times
model.mod
(2.82 KiB) Downloaded 90 times
pabalo
 
Posts: 3
Joined: Fri Dec 05, 2008 5:22 pm

Re: Does deterministic simulation break down in version 4?

Postby SébastienVillemot » Wed Sep 02, 2009 8:16 am

Hi,

I have run your model (using the right timing convention for histval, i.e. lag 0 and not -1), using both Dynare 4.0.4 and 3.065.

I obtain exactly the same results in both versions. More precisely, I have checked the simulations for variables "y", "r" and "q", as in your Excel files these variables differ from v3 to v4.
Actually for these three variables, I get the same paths in both Dynare versions, and those paths correspond the path reported for v4 in your Excel file. So my guess is that the path reported for v3 in your Excel file is wrong: actually it is not what I get with v3 on my computer.

Best,
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France


Return to Dynare help

Who is online

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