Dear Prof. Pfeifer,
My code works with some countries's macro data. However, when I transfer to use China data, I encountered the following error:
Log data density [Laplace approximation] is NaN.
Error using chol
Matrix must be positive definite with real diagonal.
Error in posterior_sampler_initialization (line 84)
d = chol(vv);
Error in posterior_sampler (line 60)
posterior_sampler_initialization(TargetFun, xparam1, vv, mh_bounds,dataset_,dataset_info,options_,M_,estim_params_,bayestopt_,oo_);
Error in dynare_estimation_1 (line 447)
posterior_sampler(objective_function,posterior_sampler_options.proposal_distribution,xparam1,posterior_sampler_options,bounds,dataset_,dataset_info,options_,M_,estim_params_,bayestopt_,oo_);
Error in dynare_estimation (line 105)
dynare_estimation_1(var_list,dname);
Error in code (line 965)
oo_recursive_=dynare_estimation(var_list_);
Error in dynare (line 223)
evalin('base',fname) ;
Is it due to the poor measurement of China data? How can I fix the problem?
Your help is highly appreciated. I am looking forward to your reply. The code and data are attached here.