Problems with Bayesian estimation (In a Nonlinear model)

Hi

I cannot get IRFs and Prior-Posterior plots when I run my code on Dynare. I tried different mode_compute but the problem did not get any better.
Mode_check shows that I have multiple modes for some of the parameters but I do not know if that causes the problem or not! If yes, any hint how I can overcome this problem?

The error message that I receive is as follows:

Initial value of the log posterior (or likelihood): -10408417.7231
Final value of minus the log posterior (or likelihood):-1833.441919

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 324)
In dynare_estimation (line 105)
In forum_homi.driver (line 903)
In dynare (line 296)

MODE CHECK

Fval obtained by the minimization routine (minus the posterior/likelihood)): -1833.441919
mode_check:: could not solve model for parameter hf at value 1.000, error code: 22
mode_check:: could not solve model for parameter OmegaInfl at value 0.764, error code: 4
mode_check:: could not solve model for parameter OmegaInfl at value 0.841, error code: 4
mode_check:: could not solve model for parameter OmegaInfl at value 0.917, error code: 4
mode_check:: could not solve model for parameter OmegaInfl at value 0.994, error code: 4
mode_check:: could not solve model for parameter rhoM at value 1.000, error code: 3
mode_check:: could not solve model for parameter rhoAT at value 1.000, error code: 3
mode_check:: could not solve model for parameter rhoAK at value 1.000, error code: 3
mode_check:: could not solve model for parameter rhoINTER at value 1.000, error code: 3
mode_check:: could not solve model for parameter rhoAIH at value 1.000, error code: 3

RESULTS FROM POSTERIOR ESTIMATION
parameters
prior mean mode s.d. prior pstdev

hf 0.350 0.8843 0.0152 beta 0.1000
pphi 1.000 0.9305 0.0953 gamm 0.1000
Omega 0.500 0.4129 0.0000 beta 0.1000
OmegaR 0.750 0.6206 0.0392 beta 0.1000
OmegaY 0.000 -0.1080 0.0214 norm 0.0500
OmegaInfl 1.500 1.5285 0.0709 norm 0.1000
zetaH 1.000 1.1228 0.1264 gamm 0.2000
zetak 0.800 0.7426 0.0000 gamm 0.2000
rhoM 0.900 0.9935 0.0037 beta 0.0500
rhoz 0.900 0.5892 0.0293 beta 0.0500
rhoAT 0.900 0.9394 0.0311 beta 0.0500
rhoAK 0.900 0.8245 0.0250 beta 0.0500
rhoINTER 0.850 0.8435 0.0349 beta 0.0500
rhoAIH 0.900 0.9935 0.0037 beta 0.0500

standard deviation of shocks
prior mean mode s.d. prior pstdev

EPS_M 0.001 0.0885 0.0072 invg 0.0500
EPS_z 0.001 0.3387 0.0268 invg 0.0500
EPS_AT 0.001 0.0153 0.0027 invg 0.0500
EPS_AK 0.001 0.0379 0.0000 invg 0.0500
EPS_INTER 0.001 0.0718 0.0084 invg 0.0500
EPS_AIH 0.001 0.0145 0.0011 invg 0.0500
EPS_R 0.001 0.0068 0.0008 invg 0.0500

Log data density [Laplace approximation] is NaN.

Estimation::mcmc: Multiple chains mode.
Warning: File not found or permission denied

In posterior_sampler_initialization (line 102)
In posterior_sampler (line 60)
In dynare_estimation_1 (line 474)
In dynare_estimation (line 105)
In forum_homi.driver (line 903)
In dynare (line 296)
Estimation::mcmc: Old metropolis.log file successfully erased!
Estimation::mcmc: Creation of a new metropolis.log file.
Estimation::mcmc: Searching for initial values…
Estimation::mcmc: I couldn’t get a valid initial value in 100 trials.
Estimation::mcmc: You should reduce mh_init_scale…
Estimation::mcmc: Parameter mh_init_scale is equal to 0.400000.
Estimation::mcmc: Enter a new value…


forum_homi.mod (20.2 KB)
Bmodel.xls (40.5 KB)



Your detected mode is clearly not the correct one. Other mode-finders return better values. At the same time, your model has a tendency to run towards the boundary of the stability and determinacy region.

Thank you so much for your reply.
In order to get better mode values, do you have any specificc mode-finder in your mind? When I check the other ones, the same error message pops up. Regarding the boundary problem, what should I do to solve it? Playing with the priors can help?

  1. Most often, I use mode_compute=5 these days.
  2. Yes, modifying the priors can help.