Estimation problems of "Matrix must be positive definite"

Hi Professor, I encountered problem of “Matrix must be positive definite” when I estimated parameters. The estimation mod file and data file are being uploaded for your reference. I searched for the forum for the solution, but still got following questions.

  1. It said that I need to change the initial value of parameters, then how can I determine the proper initial values to avoid this error?
  2. It took as long as one hour to report the error, is there any way that it report the error earlier?
  3. I tried both mode_compute=9 and mode_compute=6, they both reported the same error and took a long time to run. What else can I do to solve this problem?
  4. Actually, it didn’t report the error until I add three variables to the model. Before I add three variables, the model worked successfully. Why this happens?

It would be greatly appreciated if you could give me some hint, especially on how to solve this problem. Thank you very much!
estimation 2.zip (182.4 KB)

See

Dear professor,
I have the same problem with “error using chol”, but my data is detrended by HP filter. Do you have any suggestions?
data_prep.m (3.5 KB)
projekt_mamo.xlsx (21.4 KB)
projekt_rekurze.mod (8.9 KB)
y.mat (37.7 KB)

Your model is unsuitable for estimation as it does not handle parameter dependence correctly.

I am really sorry, I do not understand, what should I change then? calibration or prior in estimated parameters?

See e.g.

Thank a lot professor, you were really helpful, my code is now working.