Hi professor!

I lately wrote a model and tried to estimate it. But there is a problem. Dynare can only give me posterior modes, after which It reported the following error message:

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 62)

ix2, ilogpo2, ModelName, MetropolisFolder, fblck, fline, npar, nblck, nruns, NewFile, MAX_nruns, d ] = …

Error in dynare_estimation_1 (line 782)

feval(options_.posterior_sampling_method,objective_function,options_.proposal_distribution,xparam1,invhess,bounds,dataset_,options_,M_,estim_params_,bayestopt_,oo_);

Error in dynare_estimation (line 89)

dynare_estimation_1(var_list,dname);

Error in landfinance_bys_fullshock (line 713)

dynare_estimation(var_list_);

Error in dynare (line 180)

evalin(‘base’,fname) ;

And I couldn’t get posterior means if the problem is not solve. Does the matrix means covariance matrix for the proposal density of the MCMC sampler? I add an option`mcmc_jumping_covariance = prior_variance`

. But it said that my value of `mh_init_scale `

was too large (0.4), and I had to change it to a very small value to let it proceed. The result is also weird. The condifence interval is too narrow that the upper value is almost equal to the lower value.

So…How can I modify my estimation option to get reliable posterior means and confidence interval?

My code is packed in zip file in the attachmentestimating.zip (11.2 KB). Thank you so much!