From 35b1a6859fbeaa1c15ae53d25672d09d6285e227 Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Wed, 9 Dec 2020 22:31:21 +0100 Subject: [PATCH] :bug: allow cova_compute=0 with user-defined MCMC_jumping_covariance --- matlab/check_posterior_sampler_options.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/matlab/check_posterior_sampler_options.m b/matlab/check_posterior_sampler_options.m index 0cb507586..ceb6c6337 100644 --- a/matlab/check_posterior_sampler_options.m +++ b/matlab/check_posterior_sampler_options.m @@ -378,11 +378,13 @@ end % here are all samplers requiring a proposal distribution if ~strcmp(posterior_sampler_options.posterior_sampling_method,'slice') - if ~options_.cova_compute && ~(options_.load_mh_file && posterior_sampler_options.use_mh_covariance_matrix) + if ~options_.cova_compute && ~(options_.load_mh_file && posterior_sampler_options.use_mh_covariance_matrix) + if strcmp('hessian',options_.MCMC_jumping_covariance) skipline() disp('check_posterior_sampler_options:: I cannot start the MCMC because the Hessian of the posterior kernel at the mode was not computed') disp('check_posterior_sampler_options:: or there is no previous MCMC to load ') error('check_posterior_sampler_options:: MCMC cannot start') + end end end