Dear Pfeifer,
My code can run and do the estimation, but when it almost comes to the end, it runs into the following error:
Estimation::compute_moments_varendo: I'm computing endogenous moments (this may take a while)... Subscript indices must either be real positive integers or logicals.
Error in kernel_density_estimate (line 82)
xi(indx+[1 2]) = xi(indx+[1 2]) + [1-temp,temp]';
Error in posterior_moments (line 91)
[density(:,1),density(:,2)] = kernel_density_estimate(xx,number_of_grid_points,...
Error in covariance_mc_analysis (line 113)
posterior_moments(tmp,1,mh_conf_sig);
Error in posterior_analysis>job (line 57)
oo_ = covariance_mc_analysis(SampleSize,'posterior',M_.dname,M_.fname,...
Error in posterior_analysis (line 38)
oo_ = job(type,SampleSize,arg1,arg2,arg3,options_,M_,oo_,nvar,vartan);
Error in compute_moments_varendo (line 77)
oo_ = posterior_analysis('variance',var_list_(i,:),var_list_(j,:),[],options_,M_,oo_);
Error in dynare_estimation_1 (line 514)
oo_ = compute_moments_varendo('posterior',options_,M_,oo_,var_list_);
Error in dynare_estimation (line 105)
dynare_estimation_1(var_list,dname);
Error in code (line 964)
oo_recursive_=dynare_estimation(var_list_);
Error in dynare (line 223)
evalin('base',fname) ;
Here attached the code and data. Please help me check where the problem is. Thank you in advance!
I am looking forward to your reply.