Page 1 of 1

simulations

PostPosted: Fri Apr 09, 2010 3:29 am
by dsge
Hello...

I am trying to simulate 1000 replications from a model that Dynare solved, each with 300 periods. Is there a more efficient way of doing this other than putting stoch_simul in a loop?

for count = 1 : 1000
stoch_simul(order=2,periods=300,noprint);
YY(:,count) = Y;
end

I tried "replic" in stoch_simul but that didn't work. What I have above works but it's highly inefficient since it solve the model everytime even though the solution do not change.

Any help is appreciated.

Re: simulations

PostPosted: Fri Apr 09, 2010 4:47 pm
by rockyyao
I have the same problem. I am using Dynare 4.1.0.

The simulation commend doesn't work : stoch_simul(hp_filter=1600, periods=200,replic=1000,print,nograph) y pi mc;

it gives me the following error:

??? Index exceeds matrix dimensions.

Error in ==> dyn2vec at 49
assignin('base',deblank(M_.endo_names(i,:)),oo_.endo_simul(i,k)');

Error in ==> stoch_simul at 82
dyn2vec;

Error in ==> lagexp_RR_TL at 960
info = stoch_simul(var_list_);

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

Could anyone help me too?

Thanks

Fang

Re: simulations

PostPosted: Thu Apr 15, 2010 9:57 am
by SébastienVillemot
Hi

Please post your MOD file. It's impossible to help you debug this without that file.

Best

Re: simulations

PostPosted: Thu Apr 15, 2010 12:44 pm
by rockyyao
Thanks for replying.

I think the problem lies in my model, which has a lot of dummies for expectations. When I specify "periods=***", simulation commend can not generate sample moments. it maybe reveals a bug in the program.

P.S. my mode file and the steady state file

Re: simulations

PostPosted: Thu Apr 15, 2010 12:51 pm
by dsge
A reply to my original question is also appreciated (which is distinct from rockyyao's problem).