Page 1 of 1

How to replicate 100 times an RBC model?

PostPosted: Sat Aug 30, 2014 2:20 pm
by accolleyd
Hi, I am trying to replicate 100 times a basic RBC economy as follows.

for j=1:100,
stoch_simul(periods=128, hp_filter=1600,IRF=0,noprint);
end;

I have got complex numbers in filtering the simulated series and computing the mean of my summary statistics. This is due to the fact that dynare has generated negative values for investment.
I would appreciate if you could suggest another way of writing the loop to avoid these problems. Regards

Re: How to replicate 100 times an RBC model?

PostPosted: Sat Aug 30, 2014 2:24 pm
by jpfeifer
See http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=5225
Negative values should not be an issue unless you take logs of these values and I don't see why you are doing this.

Re: How to replicate 100 times an RBC model?

PostPosted: Sat Aug 30, 2014 8:44 pm
by accolleyd
Thanks for your reply, Johannes. The link you suggested is useful.
Indeed I took logs of the series Dynare simulated in order to compute myself the relative standard deviations of the filtered series. That is why I'm getting complex numbers in the averages.

Re: How to replicate 100 times an RBC model?

PostPosted: Sat Aug 30, 2014 9:02 pm
by jpfeifer
Then you should set up your model in loglinear form (e.g. using an exp()-transformation or the loglinear option).

Re: How to replicate 100 times an RBC model?

PostPosted: Sat Aug 30, 2014 11:09 pm
by accolleyd
Thanks, dear