multiple period OLG - problem with sim1

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.

multiple period OLG - problem with sim1

Postby timbuyse » Fri Feb 07, 2014 8:57 pm

Dear all,

I have a question concerning the simulation of deterministic shocks in a standard three or more period OLG model in Dynare.

In (for instance) a three period OLG model, with standard settings, it was always possible for me to simulate shocks using older versions of Dynare (eg. 4.2.5 or older).

However, using versions 4.3.. and especially the unstable 4.4 I always get an error as mentioned below. It seems that in reshaping the simulation elements, there is some error in line 153 of sim1. I can solve this by changing "periods+2" to "periods+2*(n-1)" where n = the number of periods in the model.
I have both a four-period and a thirty-period OLG model in Dynare. And indeed, for the four-period model to simulate correctly, I need to change this line to periods+2*3, for the thirty-period model, I need to change this to periods+2*29. In our model, there are indeed multiple lags and leads (n-1 to be concrete).

I was wondering if this is a common problem, or if anything else can be done in the .mod file to solve this.

Thanks in advance.

Tim Buyse
Ghent University

Error using reshape
To RESHAPE the number of elements must not change.
Error in sim1 (line 153)
oo_.endo_simul = reshape(Y,ny,periods+2);

Error in simul (line 121)
sim1;
Error in retp1 (line 589)
simul();
Error in dynare (line 147)
evalin('base',fname) ;
timbuyse
 
Posts: 4
Joined: Fri Feb 19, 2010 3:52 pm

Re: multiple period OLG - problem with sim1

Postby jpfeifer » Fri Feb 07, 2014 9:09 pm

Please send me the mod-file to investigate the issue.
------------
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: multiple period OLG - problem with sim1

Postby jpfeifer » Fri Feb 14, 2014 9:04 am

This seems to be a bug. We are investigating the issue and will keep you updated.
------------
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: multiple period OLG - problem with sim1

Postby jpfeifer » Fri Apr 04, 2014 8:25 am

The issue has been fixed in Dynare 4.4.1
------------
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 contributions and examples

Who is online

Users browsing this forum: No registered users and 5 guests