evaluate set_prior only when needed

silicon
Marco Ratto 2023-01-26 09:27:07 +01:00
parent 035db8b8c4
commit 783c237d17
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,6 @@ if isempty(dataset)
end
options_=select_qz_criterium_value(options_);
[~,~,~,lb,ub] = set_prior(estim_params_,M_,options_);
if ~isempty(bayestopt_) && any(bayestopt_.pshape > 0)
% Plot prior densities.
% Set prior bounds
@ -81,6 +80,7 @@ if ~isempty(bayestopt_) && any(bayestopt_.pshape > 0)
else % estimated parameters but no declared priors
% No priors are declared so Dynare will estimate the model by
% maximum likelihood with inequality constraints for the parameters.
[~,~,~,lb,ub] = set_prior(estim_params_,M_,options_);
bounds.lb = lb;
bounds.ub = ub;
end