diff --git a/matlab/dynare_estimation_init.m b/matlab/dynare_estimation_init.m index 7f336e8d78cf393e20dddb887b85bce80f7a7970..cccaada16cadd890a8a96598198b737def5678af 100644 --- a/matlab/dynare_estimation_init.m +++ b/matlab/dynare_estimation_init.m @@ -714,4 +714,13 @@ if options_.occbin.smoother.status && options_.occbin.smoother.inversion_filter fprintf('dynare_estimation_init: the inversion filter does not support smoothed_state_uncertainty. Disabling the option.\n') options_.smoothed_state_uncertainty=false; end +end + +if options_.occbin.smoother.status || options_.occbin.likelihood.status + if isfield(M_,'surprise_shocks') && ~isempty(M_.surprise_shocks) + fprintf('dynare_estimation_init: OccBin smoother/filter: previous shocks(surprise) block detected. Deleting its content.\n') + options_.occbin.simul.SHOCKS=zeros(1,M_.exo_nbr); + options_.occbin.simul.exo_pos=1:M_.exo_nbr; + M_.surprise_shocks=[]; + end end \ No newline at end of file