Bayesian estimation Error using

Dear Professor:
I am Li,a phd student in economics from PKU in China.I plan to estimated the DSGE model with financial frictions,and I attached the code and data in the appendix,if you run the mparun2.m,you can get the steady state and then estimate the model,but it displays : error using dseries/struct, could you please tell me how to fix it?Thank you!

Best wishes
data.m (4.5 KB)
find_foc_difference.m (1.9 KB)
find_lognormal_difference.m (232 Bytes)
find_sigma_cond_Fomegabar.m (894 Bytes)
get_omega_cond_Fomegabar.m (2.1 KB)
mpa.mod (9.5 KB)
mparun2.m (28.2 KB)

Are you using the most recent Dynare version? And what is the full error message? The code runs on my machine. A general remark: do not call your data data. That can lead to problems.

Dear jpfeifer ,thank you for your reply.I use dynare 4.5.7,the code runs at the very beginning,but after the sampling procedure,which might take 10-15 minutes,it didn’t work,the full error messsage is:

error using dseries/struct.
too many input arguments .
error in posterior_sampler (line 84).
localVars = struct(‘TargetFun’, TargetFun, …
error in dynare_estimation_1 (line 448)

could you please tell me how to fix?Thank you!I really need your help.

Get_omega function中的自定义函数与mparun中调用的input arguments不一致。祝好!

Thank you,but it can not fix this problem,since the Bayesian estimation didn’t require this function

一步一步来,这个修复之后,再出现什么error messages

Dear jpfeifer,I update my Matlab version from 2016 to 2018,it works.Thank you!