diff --git a/matlab/estimation/GetAllPosteriorDraws.m b/matlab/estimation/GetAllPosteriorDraws.m index d2b891651244b9e99e4936a5e2e78a30e3884d67..b2c591f58ab07b42113971109f66a8fe529066eb 100644 --- a/matlab/estimation/GetAllPosteriorDraws.m +++ b/matlab/estimation/GetAllPosteriorDraws.m @@ -53,8 +53,7 @@ if issmc(options_) end elseif isonline(options_) % Load draws from the posterior distribution - pfiles = dir(sprintf('%s/online/particles-*.mat', dname)); - posterior = load(sprintf('%s/online/particles-final.mat', dname, length(pfiles), length(pfiles))); + posterior = load(sprintf('%s/online/parameters_particles_final.mat', dname)); if column>0 || strcmp(column,'all') if strcmp(column,'all') draws = transpose(posterior.param); @@ -62,7 +61,7 @@ if issmc(options_) draws = transpose(posterior.param(column,:)); end else - draws = posterior.tlogpostkernel; +% draws = posterior.tlogpostkernel; end elseif isdime(options_) posterior = load(sprintf('%s%s%s%schains.mat', dname, filesep(), 'dime', filesep())); diff --git a/matlab/estimation/GetPosteriorParametersStatistics.m b/matlab/estimation/GetPosteriorParametersStatistics.m index 63a40adcb75b3b76976f59804a213181848470cd..ebaf93666523353a3a2df5c5d54f5f594743395d 100644 --- a/matlab/estimation/GetPosteriorParametersStatistics.m +++ b/matlab/estimation/GetPosteriorParametersStatistics.m @@ -55,9 +55,11 @@ skipline(2) disp('ESTIMATION RESULTS') skipline() -if ishssmc(options_) || isonline(options_) +if ishssmc(options_) dprintf('Log data density is %f.', oo_.MarginalDensity.hssmc); hpd_draws = round((1-options_.mh_conf_sig)*num_draws); +elseif isonline(options_) + hpd_draws = num_draws; elseif isdime(options_) hpd_draws = round((1-options_.mh_conf_sig)*num_draws); else diff --git a/matlab/estimation/set_number_of_subdraws.m b/matlab/estimation/set_number_of_subdraws.m index fd3bdec202e3a574318004eef8354e04fb273f52..0241b32050e50376e00b3f4570f7c1cbb9ec13aa 100644 --- a/matlab/estimation/set_number_of_subdraws.m +++ b/matlab/estimation/set_number_of_subdraws.m @@ -59,8 +59,7 @@ else NumberOfDrawsPerChain=NumberOfDraws; elseif isonline(options_) % Load draws from the posterior distribution - pfiles = dir(sprintf('%s/online/particles-*.mat', M_.dname)); - posterior = load(sprintf('%s/online/particles-%u-%u.mat', M_.dname, length(pfiles), length(pfiles))); + posterior = load(sprintf('%s/online/parameters_particles_final.mat', M_.dname)); NumberOfDraws = size(posterior.param,2); NumberOfDrawsPerChain=NumberOfDraws; elseif isdime(options_)