From b77791c5413fdfa14221c21d8dbd7f2282e421ea Mon Sep 17 00:00:00 2001 From: Marco Ratto Date: Wed, 22 Mar 2017 23:06:19 +0100 Subject: [PATCH] ensure invhess is empty with slice for proper prior initialization of chains --- matlab/check_posterior_sampler_options.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/matlab/check_posterior_sampler_options.m b/matlab/check_posterior_sampler_options.m index 299b4b3f6..1980c0a79 100644 --- a/matlab/check_posterior_sampler_options.m +++ b/matlab/check_posterior_sampler_options.m @@ -418,6 +418,10 @@ if strcmp(posterior_sampler_options.posterior_sampling_method,'slice') posterior_sampler_options.V1=V1; posterior_sampler_options.WR=sqrt(diag(D))*3; end + else + if ~options_.load_mh_file && ~posterior_sampler_options.slice_initialize_with_mode, + posterior_sampler_options.invhess=[]; + end end % needs to be re-set to zero otherwise posterior analysis is filtered