Commit 9a622298 authored by Marco Ratto's avatar Marco Ratto
Browse files

Fixed spurious bugs when new MC smoother is invoked when an old one is already...

Fixed spurious bugs when new MC smoother is invoked when an old one is already present in gsa results subfolders
parent 543b4040
...@@ -289,24 +289,42 @@ if options_gsa.rmse, ...@@ -289,24 +289,42 @@ if options_gsa.rmse,
options_.filtered_vars=0; options_.filtered_vars=0;
end end
% dynare_MC([],OutputDirectoryName,data,rawdata,data_info); % dynare_MC([],OutputDirectoryName,data,rawdata,data_info);
prior_posterior_statistics('gsa',dataset_); if options_gsa.pprior
if options_.bayesian_irf TmpDirectoryName = ([M_.dname filesep 'gsa' filesep 'prior']);
PosteriorIRF('gsa'); else
TmpDirectoryName = ([M_.dname filesep 'gsa' filesep 'mc']);
end
if exist(TmpDirectoryName,'dir');
mydelete([M_.fname '_filter_step_ahead*.mat'],[TmpDirectoryName filesep]);
mydelete([M_.fname '_inno*.mat'],[TmpDirectoryName filesep]);
mydelete([M_.fname '_smooth*.mat'],[TmpDirectoryName filesep]);
mydelete([M_.fname '_update*.mat'],[TmpDirectoryName filesep]);
filparam = dir([TmpDirectoryName filesep M_.fname '_param*.mat']);
for j=1:length(filparam),
if isempty(strmatch([M_.fname '_param_irf'],filparam(j).name))
delete([TmpDirectoryName filesep filparam(j).name]);
end
end end
options_gsa.load_rmse=0;
% else end
% if options_gsa.load_rmse==0, prior_posterior_statistics('gsa',dataset_);
% disp('You already saved a MC filter/smoother analysis ') if options_.bayesian_irf
% disp('Do you want to overwrite ?') PosteriorIRF('gsa');
% pause; end
% if options_gsa.pprior options_gsa.load_rmse=0;
% delete([OutputDirectoryName,'/',fname_,'_prior_*.mat']) % else
% else % if options_gsa.load_rmse==0,
% delete([OutputDirectoryName,'/',fname_,'_mc_*.mat']) % disp('You already saved a MC filter/smoother analysis ')
% end % disp('Do you want to overwrite ?')
% dynare_MC([],OutputDirectoryName); % pause;
% options_gsa.load_rmse=0; % if options_gsa.pprior
% end % delete([OutputDirectoryName,'/',fname_,'_prior_*.mat'])
% else
% delete([OutputDirectoryName,'/',fname_,'_mc_*.mat'])
% end
% dynare_MC([],OutputDirectoryName);
% options_gsa.load_rmse=0;
% end
end end
end end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment