How to solve the problem?

Dear all,
I want to change the data to do another topic, the output.mat is my data. But I got the following problem:
I don’t know how to match my data with the estimation part.
Final value of minus the log posterior (or likelihood):800.630805

POSTERIOR KERNEL OPTIMIZATION PROBLEM!
(minus) the hessian matrix at the “mode” is not positive definite!
=> posterior variance of the estimated parameters are not positive.
You should try to change the initial values of the parameters using
the estimated_params_init block, or use another optimization routine.
Warning: The results below are most likely wrong!

In dynare_estimation_1 (line 315)
In dynare_estimation (line 105)
In ERJ_est.driver (line 2450)
In dynare (line 293)

MODE CHECK

Fval obtained by the minimization routine (minus the posterior/likelihood)): 800.630805
mode_check:: could not solve model for parameter csih at value 0.627, error code: 3
Warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN.
DataEstMax2.mat (21.5 KB)
ERJ_est.mod (50.5 KB)
ERJ_est_steadystate.m (2.3 KB)
output.mat (17.5 KB)
param_ERJ.m (6.7 KB)
ss_ERJ_notax.m (27.7 KB)

I am getting issues with your steady state file that does not solve for all parameter draws and sometimes crashes due to NaN values in the initial condition. The attached steady state file fixes some of that by implementing a try-catch statement with proper return codes for use in Dynare
ERJ_est_steadystate.m (30.2 KB)

After that, I get

The following parameters are at the bound: rhoAhb, rhoAfb, rhoECf

which is often a sign that the data mean is not consistent with the steady state values.
Finally, the mode_check plots show many flat likelihoods, suggesting that there may be identification issues.

Thank you Professor, I’ll check it carefully!