The forecast error variance in the multivariate Kalman filter became singular for some priors

Hi everyone, I am trying to estimate my DSGE model using bayesian estimation. The problem is that depending on prior values of my parameters the model sometimes returns me the error message “The forecast error variance in the multivariate Kalman
filter became singular” and for some parameters it returns different error after trying to find the mode.

baseline.mod (16.9 KB)
estimation_data.xlsx (25.6 KB)

Try analytic derivatives with mode_compute=5.
baseline.mod (16.9 KB)

Thank You professor for Your reply. I tried as You said, but I am still getting the same error.

In the unstable version, I obtained the following mode, which worked.
baseline_mode.mat (12.6 KB)

I changed my Dynare version to the Dynare 6.2. Now I am getting another error using the code You provided.

Iteration 2
Error using  * 
Incorrect dimensions for matrix multiplication. Check that the number of columns in the
first matrix matches the number of rows in the second matrix. To operate on each
element of the matrix individually, use TIMES (.*) for elementwise multiplication.

Error in csminit1 (line 77)
    dx = -H0*g;```
...

That is a known bug in 6.2 that will be fixed in 6.3. For now, you need the unstable version.