Skip to content
Snippets Groups Projects
Commit 64735c0a authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Fixed bug instroduced in 30f2180a.

parent c5cb3009
Branches
Tags
No related merge requests found
......@@ -50,6 +50,7 @@ function [dataset_, dataset_info, xparam1, hh, M_, options_, oo_, estim_params_,
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
hh = [];
xparam1 = [];
if isempty(gsa_flag)
gsa_flag = 0;
......@@ -310,7 +311,8 @@ if options_.use_calibration_initialization %set calibration as starting values
[xparam1,estim_params_]=do_parameter_initialization(estim_params_,xparam1_calib,xparam1); %get explicitly initialized parameters that have precedence to calibrated values
end
end
if all(bayestopt_.pshape==0) && any(isnan(xparam1))
if ~isempty(bayestopt_) && all(bayestopt_.pshape==0) && any(isnan(xparam1))
error('ML estimation requires all estimated parameters to be initialized, either in an estimated_params or estimated_params_init-block ')
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment