stochastic extended path algorithm

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.

stochastic extended path algorithm

Postby Barbara » Fri Dec 20, 2013 12:35 pm

Hi,
when I try the stochastic extended path algorithm, by setting the option "order=INTEGER" (whatever integer I set... of course it works with "0")
I get this error message

??? Error: File: solve_stochastic_perfect_foresight_model.m
Line: 193 Column: 17
The variable nzA in a parfor cannot be classified.
See Parallel for Loops in MATLAB, "Overview".

Error in ==> extended_path at 180
[flag,tmp] = ...

Error in ==> RD_new_ep at 425
extended_path([], 100);

Error in ==> dynare at 162
evalin('base',fname) ;


Any help is more than welcome!!!!
Barbara
Barbara
 
Posts: 4
Joined: Fri Dec 20, 2013 12:17 pm

Re: stochastic extended path algorithm

Postby jpfeifer » Fri Dec 20, 2013 5:27 pm

Are you using 4.4. If not, try it and please report back by posting the mod-file
------------
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: stochastic extended path algorithm

Postby Barbara » Sat Dec 21, 2013 7:33 am

Hi, thanks for your reply.
Yes, I am using Dynare 4.4.
I obtain the same error message running the very simple model "example1" of the documentation (here attached).
Attachments
example1.mod
(1.56 KiB) Downloaded 414 times
Barbara
 
Posts: 4
Joined: Fri Dec 20, 2013 12:17 pm

Re: stochastic extended path algorithm

Postby jpfeifer » Fri Dec 27, 2013 11:56 am

I ran the file with order=2 without any problems. Are you trying to run EP in a parallel context? The error message you posted refers to the parallel computing toolbox.
------------
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: stochastic extended path algorithm

Postby Barbara » Sat Dec 28, 2013 8:31 am

Hi,
I am not running Dynare invoking any parallel option. Futher, I do not have the Matlab parallel computing toolbox installed. Might it this be the problem?
Cheers,
Barbara
Barbara
 
Posts: 4
Joined: Fri Dec 20, 2013 12:17 pm

Re: stochastic extended path algorithm

Postby cesk » Wed Feb 05, 2014 4:20 pm

Hi everyone,

I'm having exactly the same problem as Barbara (I have dynare 4.1 and I encounter the problem even with the example file posted in this discussion) and I'm really struggling to get a solution. I tried to substitute the parfor loop in solve_stochastic_perfect_foresight_model with a for loop. Then I did not receive the same error message as before, but the following:

??? Maximum variable size allowed by the program is exceeded.

Error in ==> repmat at 86
B = A(:, ones(siz(2), 1));

Error in ==> solve_stochastic_perfect_foresight_model at 77
Y = repmat(endo_simul(:),1,world_nbr);

Error in ==> extended_path at 180
[flag,tmp] = ...

Error in ==> example1 at 153
extended_path([], 100);

Error in ==> dynare at 174
evalin('base',fname) ;

is there any solution/suggestion?

Cheers,
Claudio
cesk
 
Posts: 9
Joined: Wed Feb 05, 2014 4:06 pm

Re: stochastic extended path algorithm

Postby SébastienVillemot » Fri Feb 07, 2014 4:03 pm

Concerning the problem of the original poster, I don't know where it comes from. I have MATLAB without the parallel toolbox, and I cannot reproduce it. Maybe something is wrong with your MATLAB installation (like you have the parallel toolbox installed, but not the license for it).

Concerning the second problem ("Maximum variable size allowed by the program is exceeded."), it comes from the fact that you request order 10. The complexity of the stochastic extended path is an exponential function of the order, so 10 is huge. If you decrease it to a smaller value (like 2 or 3), the problem disappears.
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: stochastic extended path algorithm

Postby Barbara » Fri Feb 07, 2014 4:29 pm

Thanks, I'll try asap with a brand new installation being sure to not have the parallel toolbox around and see what happens.
As far as I understood Claudio had initially the same problem. :(
Best
Barbara
Barbara
 
Posts: 4
Joined: Fri Dec 20, 2013 12:17 pm

Re: stochastic extended path algorithm

Postby superztt » Tue Jul 21, 2015 5:59 am

I ran example1.mod. It works with a lower order like 2. But I am confused with the size of the shocks given in the oo_exo_simul. I cannot see how oo_exo_simul is derived from the shock block.

Another thing to confirm. According to a past post, there are no irfs after extended_path is because the algorithm assumes expected future shocks are zero. But are oo_endo_simul still the mean of stochastic simulations of numerous non-zero realized shocks? So if I use simul to plot a deterministic shock, I should get a different result from plotting oo_endo_simul after extended_path, or not?

btw, I actually didn't see where discontinuity, like ZLB, kicks in example1.mod. I am not sure if this is a good example to illustrate how the command extended_path works for a discontinuous model. But I guess I can compare extended_path and stoch_simul for a nonlinear model here.
superztt
 
Posts: 58
Joined: Sat Apr 26, 2014 8:24 pm

Re: stochastic extended path algorithm

Postby MichelJuillard » Wed Jul 22, 2015 9:05 am

We are currently working on a better interface for extended_path and additional documentation.
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Re: stochastic extended path algorithm

Postby mlo666 » Mon Aug 17, 2015 4:32 pm

Hi,

I tried to simulate the IRF to a shock using the stochastic extended path in Dynare 4.3.3, using a standard simple RBC model with a minimum wage constraint imposed. To do this, I supplanted the series of shocks in extended_path.m function with a series that has a shock (0.01) in the second place and zeros elsewhere. It all seems OK and works fine with orders 0,1,2. But I noticed that at the end of the simulation, variables do not converge to (deterministic) steady state, except for order=0. Why does this happen? I initially thought it was due to uncertainty, but the weird thing is that capital goes to smaller value when order = 1 or 2, than when order = 1.

The file is attached. Thank you!
Attachments
RBC_EP.mod
(1.16 KiB) Downloaded 246 times
mlo666
 
Posts: 3
Joined: Mon Aug 17, 2015 4:16 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 4 guests