Error moments_varendo

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) ;

Hi,

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

[ul]
] either your Matlab doesn’t return a date, for a very strange reason
/
:m]] or the file simply doesn’t exist (and in get_date_of_a_file.m we don’t test if it exists)/:m][/ul]

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:

...
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

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

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