Piecewise Kalman filter

Dear colleagues,
I ran into a problem when using the new piecewise Kalmann filter option in combination with Occbin. My estimation seems to have converged to a mode, but then the Kalmann smoother crashed. Specifically, I got this output in the command window:

Occbin: linear smoother done.
Occbin smoother iteration 1.
Occbin smoother iteration 2.
Reference to non-existent field ‘regime_history’.
Error in occbin.DSGE_smoother (line 202)
regime_history = out.regime_history;
Error in dynare_estimation_1 (line 616)
[atT,innov,measurement_error,updated_variables,ys,trend_coeff,aK,T,R,P,PK,decomp,Trend,state_uncertainty,M_,oo_,bayestopt_]
=
occbin.DSGE_smoother(xparam1,dataset_.nobs,transpose(dataset_.data),dataset_info.missing.aindex,dataset_info.missing.state,M_,oo_,options_,bayestopt_,estim_params_,dataset_,dataset_info);
Error in dynare_estimation (line 118)
dynare_estimation_1(var_list,dname);
Error in E_short_obc_il.driver (line 2564)
oo_recursive_=dynare_estimation(var_list_);
Error in dynare (line 278)
evalin(‘base’,[fname ‘.driver’]);

Furthermore, when the computation stopped this picture remained on the screen:
image

The issue occurse both with Dynare 5.4 and 5.3.

I am attaching everything you need to reproduce the issue. You need to type "dynare E_short_obc_il " Many thanks in advance for your help!
Best wishes,
Ansgar
PKF_smootherissue.zip (2.5 MB)

thanks Ansgar
yes I think this is bug related to lack of convergence (may happen) when simulating the model with smoothed shocks. definitely this has to be trapped with an error message. whether we can make it converge by triggering some non-default option of the filter is another story …
cheers

Hi Marco,
thank you for responding so quickly. Which type of non-convergence is this…? I thought if the smoother loops between two alternatives regarding the length of regime 1 it chooses the shorter regime length?
Best,
Ansgar

The error code is 313, i.e.

Did not converge – infinite loop of guess regimes

not 310

Occbin solver loops between two regimes