Dear jpfeifer,
I’m a beginnner of Dynare, I’d like to use Bayesian Estimation, but met an error.

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.

this is my code and data file, I’ve read some posts in the forum and tried mode_compute 6/9, howerver some other errors I knew never occured.

Could you please help me solve this problem?
Thanks a lot！

Dear jpfeifer,
So honered to recieve your reply! The model is based on the basic NK model and all of the variables in the model are log-level, so perhaps the steady state could be 0?(but I’m not sure exactly). Do you mean that the steady state should be equal to the data mean? I’ll also read your guide paper to find some solutions.
Thanks a lot!

It seems your equations equation some but not all constant terms. That should explain why the steady states are not 0. You should consistently leave out the constants.

One that is successful, you should match the observables to the log deviations from trend, which are also mean 0. That’s not yet the case with your data.

Dear jpfeifer,
Thanks for your guidance! I seem to know what I misunderstood, maybe I’ve been obscured by the log and log-linearization, and the data just took the log form, but not the log-linearization form, I’ll try again later! If I meet new problems, perhaps I’ll bother you again.
So much respect to you!

Dear jpfeifer，
I‘ve checked form of variables and match them with data, but unfortunately the error still remains.
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.

After a simple glimpse on the graph of mode check block, there was a singular about parameters(kappa and eta) as I thought, so I just tried to let them be fixed first(with their pdf omitted in the estimated_params block), what to my suprise occured then was that the model has provided with an output. Could you please tell me why this situation arises and letting them be stochastic will make the error?
Thanks a lot!

Dear Max1，
Thanks a lot for your share! I’ll follow this series to learn basic knowledge of Dynare! Undoubtly this series is eagerly helpful for me!
Best wishes to you!