Occbin error in kalman filter

Hi!

I’m trying to use occbin to estimate a model, but I get an error that I don’t know what it means.

The complete error message is

missing_observations_kalman_filter:PKF failed in period 1 with: Occbin: Simulation terminated with periodic solution (no convergence).
Error in computing likelihood for initial parameter values

ESTIMATION_CHECKS: There was an error in computing the likelihood for initial parameter values.
ESTIMATION_CHECKS: If this is not a problem with the setting of options (check the error message below),
ESTIMATION_CHECKS: you should try using the calibrated version of the model as starting values. To do
ESTIMATION_CHECKS: this, add an empty estimated_params_init-block with use_calibration option immediately before the estimation
ESTIMATION_CHECKS: command (and after the estimated_params-block so that it does not get overwritten):

Error using print_info (line 33)
Error using print_info (line 33)
Piecewise linear Kalman filter: There was a problem in obtaining the likelihood.

Error in initial_estimation_checks (line 248)
print_info(info, options_.noprint, options_)

Error in dynare_estimation_1 (line 165)
oo_ = initial_estimation_checks(objective_function,xparam1,dataset_,dataset_info,M_,estim_params_,options_,bayestopt_,bounds,oo_);

Error in dynare_estimation (line 105)
dynare_estimation_1(var_list,dname);

Error in steady_modelV9.driver (line 1797)
oo_recursive_=dynare_estimation(var_list_);

Error in dynare (line 310)
evalin(‘base’,[fname ‘.driver’]);

Here are the files
data_use.mat (22.7 KB)
steady_modelV9.mod (18.8 KB)

Does a simulated version of the model work?

Yes! the simulation works perfectly

Right. So now the estimation no longer gives the error, which means I must have done something to fix it.
The problem is that it gets stucked after plotting the priors, I’m guessing in the initialization of the likelihood.
Is this normal? Also, I’m not sure I’m introducing the occbin estimation set up properly

steady_modelV9.mod (19.3 KB)
data_use.mat (22.7 KB)

Did you let it run for a long time? I quickly had a look and the first likelihood computation indeed takes a long time due to a large number of periods with shocks and many iterations per period required.