);", errors happened as follows:

?? 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 63)

metropolis_hastings_initialization(TargetFun, xparam1, vv,

mh_bounds,dataset_,options_,M_,estim_params_,bayestopt_,oo_);

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 ==> main201707 (line 1370)

dynare_estimation(var_list_);

Error in ==> dynare (line 180)

evalin('base',fname) ;

Then I added 'mode_compute=6' into it and ran it. I waited for a long time (over 40min) but the estimation did not terminate even though I just ran "mh_replic=500" or "mh_replic=2000" (Note: realized that Dynare guide book suggests that mh_replic should be larger than 1200). So I gave up.

Could anyone please tell me how to solve this problem or which existing posts I can refer to? Thank you.