Page 1 of 1

IRFs

PostPosted: Mon Apr 28, 2014 2:26 am
by costa
Hi all,

I´m trying to recover the impulse response values after estimation, ie, basically put the values together in a matrix . For this purpose, supose I have two shocks, I´m trying to loop over the shocks for some endogenous variable. The next step would be to put the values for the two shocks in a matrix. This is where I´m failing.

The shocks are "ah" and "yh". This is the loop I´m trying to do:
str =[ 'ah' ,'ys']
for i = 1:length(str);
choque=str(i);
resultado = [oo_PosteriorIRF.dsge.Mean.y_hat_eps_choque]

% in this last step is where I was planning to put the response of y_hat to the two shocks
end;
end;

Do you have any suggestion for achiving my goal? Sorry if this is a silly or basic question

Thanks in advance.

Re: IRFs

PostPosted: Tue May 06, 2014 6:43 pm
by jpfeifer
Working with strings is correct, but you need to use the eval-command. See e.g. http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=5259