Adapted print_info routine.

time-shift
Stéphane Adjemian (Charybdis) 2013-06-12 10:54:33 +02:00
parent 9d3a1d242a
commit 8574dfd053
7 changed files with 13 additions and 13 deletions

View File

@ -73,7 +73,7 @@ oo.dr=set_state_space(oo.dr,M,options);
[dr,info,M,options,oo] = resol(1,M,options,oo); [dr,info,M,options,oo] = resol(1,M,options,oo);
if info(1) ~= 0 && info(1) ~= 3 && info(1) ~= 4 if info(1) ~= 0 && info(1) ~= 3 && info(1) ~= 4
print_info(info, options.noprint); print_info(info, options.noprint, options);
end end
eigenvalues_ = dr.eigval; eigenvalues_ = dr.eigval;

View File

@ -271,7 +271,7 @@ function dr_np = first_step_ds(x,pm,M,dr,options,oo)
[dr_np,info] = dyn_first_order_solver(d1_np,pm.M_np,pm.dr_np,options,0); [dr_np,info] = dyn_first_order_solver(d1_np,pm.M_np,pm.dr_np,options,0);
if info if info
print_info(info,0); print_info(info, 0, options);
return return
end end
@ -309,7 +309,7 @@ function [resid,dr] = risky_residuals_k_order(ys,pm,M,dr,options,oo)
[dr_np,info] = dyn_first_order_solver(d1_np,pm.M_np,pm.dr_np,options,0); [dr_np,info] = dyn_first_order_solver(d1_np,pm.M_np,pm.dr_np,options,0);
if info if info
print_info(info,0); print_info(info, 0, options);
return return
end end
@ -386,7 +386,7 @@ function [resid,dr] = risky_residuals_k_order(ys,pm,M,dr,options,oo)
disp(aa3(:,kk2)) disp(aa3(:,kk2))
[dr,info] = dyn_first_order_solver(d1b,M,dr,options,0); [dr,info] = dyn_first_order_solver(d1b,M,dr,options,0);
if info if info
print_info(info,0); print_info(info, 0, options);
return return
end end

View File

@ -66,7 +66,7 @@ end
if info(1) > 0 if info(1) > 0
disp('Error in computing likelihood for initial parameter values') disp('Error in computing likelihood for initial parameter values')
print_info(info, DynareOptions.noprint) print_info(info, DynareOptions.noprint, DynareOptions)
end end
if any(abs(DynareResults.steady_state(BayesInfo.mfys))>1e-9) && (DynareOptions.prefilter==1) if any(abs(DynareResults.steady_state(BayesInfo.mfys))>1e-9) && (DynareOptions.prefilter==1)

View File

@ -1,9 +1,10 @@
function print_info(info,noprint) function print_info(info, noprint, DynareOptions)
% Prints error messages % Prints error messages
% %
% INPUTS % INPUTS
% info [double] vector returned by resol.m % info [double] vector returned by resol.m
% noprint [integer] equal to 0 if the error message has to be printed. % noprint [integer] equal to 0 if the error message has to be printed.
% DynareOptions [structure] --> options_
% OUTPUTS % OUTPUTS
% none % none
% %
@ -49,8 +50,7 @@ if ~noprint
error(['The Jacobian matrix evaluated at the steady state contains elements ' ... error(['The Jacobian matrix evaluated at the steady state contains elements ' ...
'that are not real or are infinite']) 'that are not real or are infinite'])
case 7 case 7
error(['One of the eigenvalues is close to 0/0 (the absolute ' ... error('One of the eigenvalues is close to 0/0 (the absolute value of numerator and denominator is smaller than %s!\n If you believe that the model has a unique solution you can try to reduce the value of qz_zero_threshold.',num2str(DynareOptions.qz_zero_threshold))
'value of numerator and denominator is smaller than 1e-6)'])
case 8 case 8
if size(info,2)>=2 if size(info,2)>=2
global M_; global M_;

View File

@ -113,7 +113,7 @@ if nargout == 0
end end
if info(1) if info(1)
print_info(info,options_.noprint) print_info(info,options_.noprint, options_)
end end

View File

@ -89,7 +89,7 @@ else
if options_.noprint == 0 if options_.noprint == 0
resid; resid;
end end
print_info(info,options_.noprint); print_info(info,options_.noprint, options_);
end end
M_.Sigma_e = Sigma_e; M_.Sigma_e = Sigma_e;

View File

@ -78,7 +78,7 @@ end
if info(1) if info(1)
options_ = options_old; options_ = options_old;
print_info(info, options_.noprint); print_info(info, options_.noprint, options_);
return return
end end