I receive the following error when running under Dynare 4.2.2 the programme in annex which functioned perfectly well under Dynare 4.0.4:
??? Error using ==> union
Too many input arguments.
Error in ==> dynare_estimation_init at 213
k2 = union(var_obs_index’,[dr.nstatic+1:dr.nstatic+dr.npred]’, ‘rows’);
Error in ==> dynare_estimation_1 at 37
[data,rawdata,xparam1] = dynare_estimation_init(var_list_);
Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});
Error in ==> test422a at 161
dynare_estimation(var_list_);
Error in ==> dynare at 120
evalin(‘base’,fname) ;
Undoubtedly there has been some change in Dynare 4.2.2 which causes this, but I do not know what to do about it. Could you help, please?
Thanks and regards
Donihue pirsy_m.m (2.09 KB) test422a.mod (2.75 KB)
Hi, Are you sure you are really using Dynare 4.2.2 ? You can check by typping dynare_version at matlab’s prompt. I am not able to reproduce your problem using this version.
Thanks for your reply, Stephane, and sorry for the late response.
Both “which dynare” and “dynare_version” return the answer that I am indeed using Dynare 4.2.2, yet the error persists on my machine. I am using Matlab 7.8.0 (R2009a); could that be the source of the problem?
Could you check, which version of union you are using. According to mathworks.de/help/techdoc/ref/union.html
the syntax should be fine unless another function with the same name is higher in the Matlab path. Hence, try using “which union”.
Thank you. I have removed dynare_v3 from the path and the model works correctly now. I greatly appreciate your advice - never would I have solved the problem otherwise!
Regards
Donihue