Page 1 of 1

multiple period OLG - problem with sim1

PostPosted: Fri Feb 07, 2014 8:57 pm
by timbuyse
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) ;

Re: multiple period OLG - problem with sim1

PostPosted: Fri Feb 07, 2014 9:09 pm
by jpfeifer
Please send me the mod-file to investigate the issue.

Re: multiple period OLG - problem with sim1

PostPosted: Fri Feb 14, 2014 9:04 am
by jpfeifer
This seems to be a bug. We are investigating the issue and will keep you updated.

Re: multiple period OLG - problem with sim1

PostPosted: Fri Apr 04, 2014 8:25 am
by jpfeifer
The issue has been fixed in Dynare 4.4.1