Skip to content
Snippets Groups Projects
Commit f19ccf7f authored by Johannes Pfeifer's avatar Johannes Pfeifer
Browse files

Set default prior_trunc=0

Closes #1953
parent 9511a071
No related branches found
No related tags found
No related merge requests found
...@@ -7112,7 +7112,7 @@ observed variables. ...@@ -7112,7 +7112,7 @@ observed variables.
   
Probability of extreme values of the prior density in each tail that is Probability of extreme values of the prior density in each tail that is
ignored when computing bounds for the parameters. Default: ignored when computing bounds for the parameters. Default:
``1e-10``. ``1e-10`` for ``posterior_sampling_method=slice`` and ``0`` otherwise .
   
.. option:: huge_number = DOUBLE .. option:: huge_number = DOUBLE
   
......
...@@ -92,6 +92,10 @@ xparam1=[]; ...@@ -92,6 +92,10 @@ xparam1=[];
[~,~,~,lb,ub] = set_prior(estim_params_,M_,options_); %Prepare bounds [~,~,~,lb,ub] = set_prior(estim_params_,M_,options_); %Prepare bounds
if ~isempty(bayestopt_) && any(bayestopt_.pshape > 0) if ~isempty(bayestopt_) && any(bayestopt_.pshape > 0)
% Set prior bounds % Set prior bounds
if options_.prior_trunc==0
fprintf('\nstability_mapping: GSA with priors requires bounded support. Setting options_.prior_trunc=1e-10.\n')
options_.prior_trunc=1e-10;
end
bounds = prior_bounds(bayestopt_, options_.prior_trunc); bounds = prior_bounds(bayestopt_, options_.prior_trunc);
bounds.lb = max(bounds.lb,lb); bounds.lb = max(bounds.lb,lb);
bounds.ub = min(bounds.ub,ub); bounds.ub = min(bounds.ub,ub);
......
...@@ -452,7 +452,7 @@ options_.mh_posterior_mode_estimation = false; ...@@ -452,7 +452,7 @@ options_.mh_posterior_mode_estimation = false;
options_.smc_posterior_mode_estimation = false; options_.smc_posterior_mode_estimation = false;
options_.prefilter = 0; options_.prefilter = 0;
options_.presample = 0; options_.presample = 0;
options_.prior_trunc = 1e-10; options_.prior_trunc = 0;
options_.smoother = false; options_.smoother = false;
options_.smoother_redux = false; options_.smoother_redux = false;
options_.posterior_max_subsample_draws = 1200; options_.posterior_max_subsample_draws = 1200;
......
...@@ -117,6 +117,14 @@ if isequal(options_.diffuse_filter,1) || (options_.kalman_algo>2) ...@@ -117,6 +117,14 @@ if isequal(options_.diffuse_filter,1) || (options_.kalman_algo>2)
end end
end end
if strcmp('slice',options_.posterior_sampler_options.posterior_sampling_method)
if options_.prior_trunc==0
fprintf('\ndynare_estimation_init: slice requires bounded support. Setting options_.prior_trunc=1e-10.\n')
options_.prior_trunc=1e-10;
end
end
options_=select_qz_criterium_value(options_); options_=select_qz_criterium_value(options_);
% Set options related to filtered variables. % Set options related to filtered variables.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment