Hello,
I am a beginner in DSGE. When using Bayesian estimation, the following problem occurred, and I didn’t know how to change it. I have provided the model and the associated parameters. I would appreciate a friend who could help me find my mistakes and fix them.The following error message is displayed in MATLAB:
Error using chol
Matrix must be positive
Error in gmhmaxlik_core (line 194)
dd = transpose(chol(CovJump));
Error in gmhmaxlik (line 100)
[PostMode, PostVariance, Scale, PostMean] = gmhmaxlik_core(fun, OldPostMode, bounds, gmhmaxlikOptions, Scale, flag, MeanPar, OldPostVariance, varargin{:});
Error in dynare_minimize_objective (line 336 )
[opt_par_values, hessian_mat, Scale, fval] = gmhmaxlik(objective_function, start_par_value, …
Error in dynare_estimation_1 (line 221)
[xparam1, fval, exitflag, hh, options_, Scale, new_rat_hess_info] = dynare_minimize_objective(objective_function,xparam1,options_.mode_compute,options_,[bounds.lb bounds.ub],bayestopt_.name,bayestopt_,hh,dataset_,dataset_info,options_,M_,estim_params_,bayestopt_,bounds,oo_);
Error in dynare_estimation (line 118)
dynare_estimation_1(var_list,dname);
Error in mit_base1.driver (line 1759)
oo_recursive_=dynare_estimation(var_list_);
Error in dynare (line 281)
evalin(‘base’,[fname ‘.driver’]);
model.zip (21.7 KB)