Account for error code 10 (Inf in Jacobian of the dynamic model) in likelihood functions.
parent
45a3e7a710
commit
6d42ec66d5
|
@ -258,8 +258,8 @@ end
|
||||||
[T,R,SteadyState,info,Model,DynareOptions,DynareResults] = dynare_resolve(Model,DynareOptions,DynareResults,'restrict');
|
[T,R,SteadyState,info,Model,DynareOptions,DynareResults] = dynare_resolve(Model,DynareOptions,DynareResults,'restrict');
|
||||||
|
|
||||||
% Return, with endogenous penalty when possible, if dynare_resolve issues an error code (defined in resol).
|
% Return, with endogenous penalty when possible, if dynare_resolve issues an error code (defined in resol).
|
||||||
if info(1) == 1 || info(1) == 2 || info(1) == 5 || info(1) == 7 || info(1) ...
|
if info(1) == 1 || info(1) == 2 || info(1) == 5 || info(1) == 7 || info(1) == 8 || ...
|
||||||
== 8 || info(1) == 22 || info(1) == 24 || info(1) == 19 || info(1) == 25
|
info(1) == 22 || info(1) == 24 || info(1) == 19 || info(1) == 25 || info(1) == 10
|
||||||
fval = objective_function_penalty_base+1;
|
fval = objective_function_penalty_base+1;
|
||||||
info = info(1);
|
info = info(1);
|
||||||
exit_flag = 0;
|
exit_flag = 0;
|
||||||
|
|
|
@ -132,8 +132,8 @@ end
|
||||||
[T,R,SteadyState,info,Model,DynareOptions,DynareResults] = dynare_resolve(Model,DynareOptions,DynareResults,'restrict');
|
[T,R,SteadyState,info,Model,DynareOptions,DynareResults] = dynare_resolve(Model,DynareOptions,DynareResults,'restrict');
|
||||||
|
|
||||||
% Return, with endogenous penalty when possible, if dynare_resolve issues an error code (defined in resol).
|
% Return, with endogenous penalty when possible, if dynare_resolve issues an error code (defined in resol).
|
||||||
if info(1) == 1 || info(1) == 2 || info(1) == 5 || info(1) == 7 || info(1) ...
|
if info(1) == 1 || info(1) == 2 || info(1) == 5 || info(1) == 7 || info(1) == 8 || ...
|
||||||
== 8 || info(1) == 22 || info(1) == 24 || info(1) == 25
|
info(1) == 22 || info(1) == 24 || info(1) == 25 || info(1) == 10
|
||||||
fval = objective_function_penalty_base+1;
|
fval = objective_function_penalty_base+1;
|
||||||
info = info(1);
|
info = info(1);
|
||||||
exit_flag = 0;
|
exit_flag = 0;
|
||||||
|
|
|
@ -214,7 +214,7 @@ end
|
||||||
% Linearize the model around the deterministic sdteadystate and extract the matrices of the state equation (T and R).
|
% Linearize the model around the deterministic sdteadystate and extract the matrices of the state equation (T and R).
|
||||||
[T,R,SteadyState,info,Model,DynareOptions,DynareResults] = dynare_resolve(Model,DynareOptions,DynareResults,'restrict');
|
[T,R,SteadyState,info,Model,DynareOptions,DynareResults] = dynare_resolve(Model,DynareOptions,DynareResults,'restrict');
|
||||||
|
|
||||||
if info(1) == 1 || info(1) == 2 || info(1) == 5 || info(1) == 25
|
if info(1) == 1 || info(1) == 2 || info(1) == 5 || info(1) == 25 || info(1) == 10
|
||||||
fval = objective_function_penalty_base+1;
|
fval = objective_function_penalty_base+1;
|
||||||
exit_flag = 0;
|
exit_flag = 0;
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue