I wonder if anybody has sample matlab code to retrieve and plot the contents of oo_.shock_decomposition that dynare saves.
The closest thing I can point you to is
Thanks Johannes. I will have a look at the function.
The order of variables in oo_.shock_decomposition - would it be the order followed in
M_.endo_names ), or that used for the decision rules in DR-order? Looks like it is M_.endo_names.
From the manual
The results are stored in the field oo_.shock_decomposition, which is a three dimensional array. The first dimension contains the M_.endo_nbr endogenous variables. The second dimension stores in the first M_.exo_nbr columns the contribution of the respective shocks. Column M_.exo_nbr+1 stores the contribution of the initial conditions, while column M_.exo_nbr+2 stores the smoothed value of the respective endogenous variable in deviations from their steady state, i.e. the mean and trends are subtracted. The third dimension stores the time periods. Both the variables and shocks are stored in the order of declaration, i.e. M_.endo_names and M_.exo_names, respectively.
Can I add that plot_shock_decomposition exactly provides you the interface to retrieve and plot results of shock decomposition