As you all know, Bayesian DSGE estimation using dynare starts with finding posterior mode.
However, I have continuously watching the following error message.
[code]Error using chol
Matrix must be positive definite.
Error in metropolis_hastings_initialization (line 68)
d = chol(vv);
Error in random_walk_metropolis_hastings (line 69)
ix2, ilogpo2, ModelName, MhDirectoryName, fblck, fline, npar, nblck, nruns, NewFile, MAX_nruns,
d ] = …
Error in dynare_estimation_1 (line 931)
Error in dynare_estimation (line 70)
Error in kor_4_1st (line 186)
Error in dynare (line 120)
As far as I know, above error can be solved by imposing different initial starting values.
However, It is quite time-consuming and I failed to start estimation eventually.
According to dynare user guide, we can impose mode file by adding “mode_file” command.
I manually coded matlab file to search posterior modes and then apply them into dynare.
Finally, estimation is successfully done.
However, I wanted to check computed posterior mode is correctly computed. (because it is calculated my own matlab code)
So, I did two things with a program that can estimate successfully without different starting values from prior mean.
- estimation using dynare without mode_file
- estimation using dynare with mode__file
I expected exactly same log data density. But they are slightly different from each other.
I know they can be slightly different but I want to ask how you think about this situation.