Trial and error with Schorfheide mod

Hi, I tried the attached mod. file, but met the following error information:
You did not declare endogenous variables after the estimation/calib_smoother command.
??? Error using ==> union
Too many input arguments.

Error in ==> dynare_estimation_init at 219
k2 = union(var_obs_index,[dr.nstatic+1:dr.nstatic+dr.npred]’, ‘rows’);

Error in ==> dynare_estimation_1 at 59
[dataset_,xparam1, M_, options_, oo_, estim_params_,bayestopt_] = dynare_estimation_init(var_list_, dname, ], M_,
options_, oo_, estim_params_, bayestopt_);

Error in ==> dynare_estimation at 70

Error in ==> us_euro_m1 at 277

Error in ==> dynare at 120
evalin(‘base’,fname) ;

help me!

zhu yong
Schorfheide.rar (6.05 KB)

hi, I have found a bug in my matlab, the Function Union does not work. I downloaded a free Function of Unionm and changed the name of the function to Union and added it to the folder of matlab in dynare. Now I can dynare the mod file.