Provide error handling to piece-wise linear Kalman filter
For example, kalman_update_algo_1
contains
[~, out, ss] = occbin.solver(M_,oo_,options_);
if isequal(out.regime_history(1),regimes_(1))
error_flag=0;
break
end
There are two issues:
-
options_.noprint
is not set locally so that any problem inoccbin.solver
will trigger a hard-error - Even if one suppresses the error, the required fields will not be set.
kalman_update_algo_1
always expects a solution.