Merge branch 'steady_nan' into 'master'

steady state computation: trap cases where parameters are NaN

See merge request Dynare/dynare!2119
conditional-likelihood-1
Sébastien Villemot 2023-01-03 11:24:26 +00:00
commit ead9023cec
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