Log data density [Laplace approximation] is NaN. 错误使用

i built my RBC model and wrote a mod file and save the simulated data for my next estimation step, but i run my estimation mode file, something went wrong.model3_est.mod (2.8 KB) simudata.mat (100.8 KB)

Mode-finding was not successful. I ran
estimation(datafile=simudata,mh_replic=1000,mh_jscale=0.9,nodiagnostic,mode_check,mode_compute=5,analytic_derivation);
and it worked.

Did you use Dynare 4.6.4? And which of the three models causes problems?

sorry for bothering. i update my mode file. And i use Dynare 4.5.7.model1_e.mod (2.3 KB) simudata.mat (727 Bytes)

Please use 4.6.4.

sir, i use 4.6.4, still can’t work, error massage shows:
You did not declare endogenous variables after the estimation/calib_smoother command.
位置 1 的索引无效。数组索引必须为正整数或逻辑值。

出错 box (line 12)
q11=a1(w1,1); %第一四分位数

出错 plot_priors (line 72)
box on

出错 dynare_estimation_init (line 338)
plot_priors(bayestopt_,M_,estim_params_,options_)

出错 dynare_estimation_1 (line 112)
dynare_estimation_init(var_list_, dname, [], M_, options_, oo_, estim_params_, bayestopt_);

出错 dynare_estimation (line 105)
dynare_estimation_1(var_list,dname);

出错 model1_e.driver (line 353)
oo_recursive_=dynare_estimation(var_list_);

出错 dynare (line 293)
evalin(‘base’,[fname ‘.driver’]) ;

This is unrelated to the mod-file, it seems. Rather, there seems to be a name conflict with a file called box.m.