diff --git a/doc/dynare.texi b/doc/dynare.texi index 25d8e5c3f..fb49e72b7 100644 --- a/doc/dynare.texi +++ b/doc/dynare.texi @@ -5467,6 +5467,15 @@ calibrated model. @end table +@vindex oo_.shock_decomposition +The results are stored in the field @code{oo_.shock_decomposition}, which is a three +dimensional array. The first dimension contains the endogenous variables for +which the shock decomposition has been requested. The second dimension stores +in the first @code{M_.exo_nbr} columns the contribution of the respective shocks. +Column @code{M_.exo_nbr+1} stores the contribution of the initial conditions, +while column @code{M_.exo_nbr+2} stores the smoothed value of the respective +endogenous variable. The third dimension stores the time periods. + @end deffn diff --git a/matlab/shock_decomposition.m b/matlab/shock_decomposition.m index 34a3b4acf..17bf4c6e2 100644 --- a/matlab/shock_decomposition.m +++ b/matlab/shock_decomposition.m @@ -1,6 +1,10 @@ function oo_ = shock_decomposition(M_,oo_,options_,varlist) % function z = shock_decomposition(M_,oo_,options_,varlist) -% Computes shocks contribution to a simulated trajectory +% Computes shocks contribution to a simulated trajectory. The field set is +% oo_.shock_decomposition. It is a n_var by nshock+2 by nperiods array. The +% first nshock columns store the respective shock contributions, column n+1 +% stores the role of the initial conditions, while column n+2 stores the +% value of the smoothed variables. % % INPUTS % M_: [structure] Definition of the model