non_linear_dsge_likelihood.m: return in case of exception without computing prior

time-shift
Johannes Pfeifer 2020-12-08 22:25:47 +01:00 committed by Stéphane Adjemian (Charybdis)
parent b3e8dbe018
commit fe93589148
Signed by: stepan
GPG Key ID: 295C1FE89E17EB3C
1 changed files with 4 additions and 2 deletions

View File

@ -166,15 +166,17 @@ DynareOptions.warning_for_steadystate = 0;
LIK = feval(DynareOptions.particle.algorithm, ReducedForm, Y, start, DynareOptions.particle, DynareOptions.threads, DynareOptions, Model);
set_dynare_random_generator_state(s1,s2);
if imag(LIK)
likelihood = Inf;
fval = Inf;
info(1) = 46;
info(4) = 0.1;
exit_flag = 0;
return
elseif isnan(LIK)
likelihood = Inf;
fval = Inf;
info(1) = 45;
info(4) = 0.1;
exit_flag = 0;
return
else
likelihood = LIK;
end