Historical Decomposition

Hi all,

I have estimated a large model, with 70 endogenous variables and 12 shocks. Everything ran ok. What I want to do is to produce a table with the contribution of each shock for some selected endogenous variables (output, inflation, exchange rate) for each year in the sample (58 at all), or for some periods. For this goal, I was trying to work with the data stored in the oo.shock_decomposition. According to this explanation, dynare.org/dynare-matlab-m2h … ition.html, as an outcome of the estimation I get 58 matrices, each one a 70x 14 matrix, where the 13th column is the role of the initial conditions, while the 14th column is the smooth variable. If my understanding is correct, each row in the matrix corresponds to one endogenous variable. My question (and problem) is : I was comparing the smoothed variables, which are stored in the oo. area, but I couldn´t find the values displayed in the last column of the matrix. So, the last column really correspond to the smoothed variables ? How can I know for sure to which endogenous variable it is linked ? As far is I know my main problem is to map the values in the matrix to the endogenous variable it refers to.

Thanks in advance.

All you need to know is here:

for i=1:endo_nbr z(i,end,:) = eval('oo.SmoothedVariables.' M_.endo_names(i,:)]); end
squeeze(z(:,end,:)) is an M_.endo_nbr by nperiods matrix containing the SmoothedVariables. The rows correspond to the endogenous variables in the order stored in M_.endo_names.

Thanks. Is it correct to assume that the order of the endogenous variables is the same as on the declaration ?

Yes, except for the declaration not storing the auxiliary variables at the end of M_.endo_names.