Verified Commit fe935891 authored by Johannes Pfeifer 's avatar Johannes Pfeifer Committed by Stéphane Adjemian
Browse files

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

parent b3e8dbe0
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment