non_linear_dsge_likelihood.m: return in case of exception without computing prior
parent
b3e8dbe018
commit
fe93589148
|
@ -166,15 +166,17 @@ DynareOptions.warning_for_steadystate = 0;
|
||||||
LIK = feval(DynareOptions.particle.algorithm, ReducedForm, Y, start, DynareOptions.particle, DynareOptions.threads, DynareOptions, Model);
|
LIK = feval(DynareOptions.particle.algorithm, ReducedForm, Y, start, DynareOptions.particle, DynareOptions.threads, DynareOptions, Model);
|
||||||
set_dynare_random_generator_state(s1,s2);
|
set_dynare_random_generator_state(s1,s2);
|
||||||
if imag(LIK)
|
if imag(LIK)
|
||||||
likelihood = Inf;
|
fval = Inf;
|
||||||
info(1) = 46;
|
info(1) = 46;
|
||||||
info(4) = 0.1;
|
info(4) = 0.1;
|
||||||
exit_flag = 0;
|
exit_flag = 0;
|
||||||
|
return
|
||||||
elseif isnan(LIK)
|
elseif isnan(LIK)
|
||||||
likelihood = Inf;
|
fval = Inf;
|
||||||
info(1) = 45;
|
info(1) = 45;
|
||||||
info(4) = 0.1;
|
info(4) = 0.1;
|
||||||
exit_flag = 0;
|
exit_flag = 0;
|
||||||
|
return
|
||||||
else
|
else
|
||||||
likelihood = LIK;
|
likelihood = LIK;
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue