Error moments_varendo

As Dynare 4 is now the main version, this forum is now closed. Please, post
on the Dynare Help forum
Forum rules
As Dynare 4 is the current Dynare version, there forum is now close. Post new question in the Dynare Help Forum.

Error moments_varendo

Postby wgonzalez » Mon Feb 23, 2009 6:40 pm

I am trying to do some exercises in ls2003, but using this command moments_varendo, I have this error, can you tell me how to solve this problem,

Thanks very much for you help

WGonzález

??? Reference to non-existent field 'datenum'.

Error in ==> get_date_of_a_file at 22
d1 = info.datenum;

Error in ==> check_posterior_analysis_data at 31
mhdate = get_date_of_a_file(mhname);

Error in ==> posterior_analysis at 20
info = check_posterior_analysis_data(type,M_);

Error in ==> compute_moments_varendo at 41
oo_ = posterior_analysis('variance',var_list_(i,:),var_list_(j,:),[],options_,M_,oo_);

Error in ==> dynare_estimation_1 at 963
oo_ = compute_moments_varendo(options_,M_,oo_,var_list_);

Error in ==> dynare_estimation at 57
dynare_estimation_1(var_list,varargin{:});

Error in ==> ls2003 at 191
dynare_estimation(var_list_);

Error in ==> dynare at 102
evalin('base',fname) ;
wgonzalez
 
Posts: 13
Joined: Sat Mar 11, 2006 2:29 pm

Re: Error moments_varendo

Postby SébastienVillemot » Tue Feb 24, 2009 9:11 am

Hi,

Dynare crashes while it tries to get the date of the last Metropolist-Hastings file. I see two possible explanations for that:

  • either your Matlab doesn't return a date, for a very strange reason
  • or the file simply doesn't exist (and in get_date_of_a_file.m we don't test if it exists)

I think it is option 2. To test it you can add the following test in get_date_of_a_file.m, so that it looks like:

Code: Select all
...
info=dir(filename);

if size(info, 1) == 0
  error([ filename ': non-existent file' ]);
end

d1 = info.datenum;
...


And tell us back what it gives. By the way, which platform (Windows 32/64, Linux 32/64) are you using? Which version of Matlab and of Dynare?

Best

Sébastien
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: Error moments_varendo

Postby wgonzalez » Tue Feb 24, 2009 12:14 pm

I using Matlab 7.5.0(2007b), the dynare snapshot version of 22/02/09, in Windows 32. How can I solve the problem?

Regards
wgonzalez
 
Posts: 13
Joined: Sat Mar 11, 2006 2:29 pm

Re: Error moments_varendo

Postby SébastienVillemot » Tue Feb 24, 2009 1:49 pm

It looks like a bug in Dynare. To help us find where it comes from, please try the modification I've suggested above.

You may also try the latest stable version of Dynare (4.0.2) to see if it also contains the problem.

Best

Sébastien
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France


Return to Dynare version 4

Who is online

Users browsing this forum: No registered users and 1 guest