diff --git a/doc/dynare.texi b/doc/dynare.texi index ca9f179153590667998aa8491ca53bf83d24d998..4b3228c3bf9c7e6e6a31e102774705e470afde64 100644 --- a/doc/dynare.texi +++ b/doc/dynare.texi @@ -5459,6 +5459,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 34a3b4acf06d7b3847f3dab0772ed03020879cca..17bf4c6e2490a421d8bcafe0f637385114f74662 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