simult_ vs stoch_simul

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.

simult_ vs stoch_simul

Postby sidus87 » Tue May 24, 2016 4:41 pm

Dear All,

I have a question concerning the simulation of the model using simult_ and stoch_simul.
In particular, i wanna calculate the ergodic mean of a variable "y". For this I consider two possibilities:

rng(1000)
stoch_simul(order=3,periods=10000,drop=8000,replic=0,irf=0,noprint,nomoments,nofunctions,nocorr,pruning);

and then just take mean(y).

Alternatively what I do is:

T=10000;
ex_ = randn(T,2); %I have two shocks in the model. shocks in the model are written as sigma_eps*eps
rng(1000)
simulation=simult_(oo_.steady_state,oo_.dr,ex_,options_.order);
ergo=mean(simulation(:,8000:end));
endonames=cellstr(M_.endo_names); %make them strings to use strcmp
index=find(strcmp('y',endonames));
y_ergo=mean(ergo(index));

strangely the results are very different. With the first procedure I get 0.9122 and with the second I get -7.8219.

Do you have an explanation for this?
sidus87
 
Posts: 23
Joined: Sat Jun 23, 2012 9:46 pm
Location: London, UK

Re: simult_ vs stoch_simul

Postby jpfeifer » Sat May 28, 2016 8:21 am

Did you enable pruning for the second one? If yes, please provide the codes
------------
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 help

Who is online

Users browsing this forum: No registered users and 11 guests