steady state computation: trap cases where parameters are NaN

conditional-likelihood-1
Johannes Pfeifer 2022-12-28 11:48:23 +01:00
parent aec0efa8f6
commit 64d61c3268
2 changed files with 6 additions and 2 deletions

View File

@ -221,7 +221,11 @@ if info(1)
info(1) == 411 || info(1) == 412 || info(1) == 413 % logarithmic reduction
%meaningful second entry of output that can be used
fval = Inf;
info(4) = info(2);
if isnan(info(2))
info(4) = 0.1;
else
info(4) = info(2);
end
exit_flag = 0;
if analytic_derivation
DLIK=ones(length(xparam1),1);

View File

@ -85,7 +85,7 @@ end
if updated_params_flag && ~isreal(params1)
info(1) = 23;
info(2) = sum(imag(params).^2);
info(2) = sum(imag(params).^2,'omitnan');
if M.set_auxiliary_variables
ys = h_set_auxiliary_variables(ys,exo_ss,params);
end