Hello Everyone,
I am estimating a dsge model using a real time recursive data set that shifts one period ahead every period, so I specify the data as follows:
for i = 94:107
for j = 1:4
cl = clock;
display(['day ', num2str(cl(3)), ' hour ', num2str(cl(4)), ' minute ', num2str(cl(5))])
display(['file: data',num2str(i),'q',num2str(j)])
datafile=['data',num2str(i),'q',num2str(j)];
nobs = 119 + 4*(i-94) + (j-1);
save options_dsge.mat datafile nobs i j counter;
dynare sw2007nw_dsge;
copyfile('sw2007nw_dsge/metropolis/sw2007nw_dsge_mh*',['dsge/',num2str(i),'q',num2str(j)]);
global M_ dr1_test ex0_ it_ oo_recursive_ trend_coeff_ bayestopt_ estim_params_ fjac oo_ options_ ys0_
save(['dsge/',num2str(i),'q',num2str(j),'/results.mat']);
rmdir('sw2007nw_dsge','s')
% rmdir('dynareParallelLogFiles','s')
close all
counter = counter + 1;
end
end
To use this in the estimation, I do the following in the .mod file:
load options_dsge;
options_.datafile=datafile;
//recursive scheme
options_.nobs = nobs;
options_.first_obs = 1;
estimation(mode_compute=4,datafile='datafile',mode_file=sw2007nw_dsge_mode,nodiagnostic,mh_replic=31250,mh_nblocks=4,mh_jscale=0.35,mh_drop=0.2,bayesian_irf,irf=40);
However, this gives me the following error:
Error using makedataset (line 108)
makedataset: I can't find a datafile (with allowed extension m, mat, csv, xls or xlsx)!
Error in dynare_estimation_init (line 553)
[dataset_, dataset_info, newdatainterfaceflag] = makedataset(options_, options_.dsge_var*options_.dsge_varlag,
gsa_flag);
Error in dynare_estimation_1 (line 112)
dynare_estimation_init(var_list_, dname, [], M_, options_, oo_, estim_params_, bayestopt_);
Error in dynare_estimation (line 105)
dynare_estimation_1(var_list,dname);
Error in sw2007nw_dsge.driver (line 762)
oo_recursive_=dynare_estimation(var_list_);
Error in dynare (line 293)
evalin('base',[fname '.driver']) ;
Error in run_dsge (line 24)
dynare sw2007nw_dsge;
Could anyone please help?
Thank you
M