Error in "union(var_obs_index'" in Dynare 4.2.2

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Error in "union(var_obs_index'" in Dynare 4.2.2

Postby donihue » Mon Oct 31, 2011 2:16 pm

Hello,

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
Attachments
pirsy_m.m
data
(2.09 KiB) Downloaded 95 times
test422a.mod
File works under Dynare 4.0.4 but not 4.2.2
(2.75 KiB) Downloaded 337 times
donihue
 
Posts: 34
Joined: Mon Sep 12, 2011 1:12 pm

Re: Error in "union(var_obs_index'" in Dynare 4.2.2

Postby StephaneAdjemian » Mon Nov 07, 2011 4:40 pm

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.

Best, Stéphane.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: Error in "union(var_obs_index'" in Dynare 4.2.2

Postby donihue » Sat Nov 12, 2011 10:10 pm

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?

Regards
Donihue
donihue
 
Posts: 34
Joined: Mon Sep 12, 2011 1:12 pm

Re: Error in "union(var_obs_index'" in Dynare 4.2.2

Postby jpfeifer » Sun Nov 13, 2011 10:03 am

Could you check, which version of union you are using. According to
http://www.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".
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Error in "union(var_obs_index'" in Dynare 4.2.2

Postby donihue » Sun Nov 13, 2011 3:10 pm

Thank you for that suggestion.

The result of using "which union" is peculiar: despite my using Dynare 4.4.2, Matlab communicates that I am using
D:\Quant\Dynare\dynare_v3\matlab\union.m
I definitely have
D:\Quant\Dynare\4.2.2\matlab
at the top of my "Set Path" list, so it seems odd that "union" would come from dynare_v3.

I suppose that I should suppress the old dynare_v3 from my main Dynare directory to resolve this?

Again, many thanks for your help.

Regards
Donihue
donihue
 
Posts: 34
Joined: Mon Sep 12, 2011 1:12 pm

Re: Error in "union(var_obs_index'" in Dynare 4.2.2

Postby StephaneAdjemian » Mon Nov 14, 2011 9:32 am

You should remove dynare 3 from your path (to use the matlab/octave implementation). This can be done by issuing the following command in matlab:

Code: Select all
rmpath D:\Quant\Dynare\dynare_v3\matlab


I don't remember if this command has permanent effect. You can also open the matlab's set path dialog box and remove this version of Dynare.

Best, Stéphane.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: Error in "union(var_obs_index'" in Dynare 4.2.2

Postby donihue » Mon Nov 14, 2011 10:04 am

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
donihue
 
Posts: 34
Joined: Mon Sep 12, 2011 1:12 pm


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 6 guests