simulations

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.

simulations

Postby dsge » Fri Apr 09, 2010 3:29 am

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.
dsge
 
Posts: 2
Joined: Fri Apr 09, 2010 3:23 am

Re: simulations

Postby rockyyao » Fri Apr 09, 2010 4:47 pm

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
rockyyao
 
Posts: 18
Joined: Mon Mar 10, 2008 4:37 pm

Re: simulations

Postby SébastienVillemot » Thu Apr 15, 2010 9:57 am

Hi

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

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: simulations

Postby rockyyao » Thu Apr 15, 2010 12:44 pm

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
rockyyao
 
Posts: 18
Joined: Mon Mar 10, 2008 4:37 pm

Re: simulations

Postby dsge » Thu Apr 15, 2010 12:51 pm

A reply to my original question is also appreciated (which is distinct from rockyyao's problem).
dsge
 
Posts: 2
Joined: Fri Apr 09, 2010 3:23 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 8 guests