discretionary policy: made returned info values compatible with Dynare
parent
abf9a0eefd
commit
e91f0776f2
|
@ -95,24 +95,24 @@ while 1
|
||||||
H10=H1;
|
H10=H1;
|
||||||
F10=F1;
|
F10=F1;
|
||||||
end
|
end
|
||||||
retcode=rcode-1;
|
|
||||||
|
|
||||||
switch retcode
|
retcode = 0;
|
||||||
|
switch rcode
|
||||||
case 3 % nan
|
case 3 % nan
|
||||||
retcode=3;
|
retcode=63;
|
||||||
retcode(2)=10000;
|
retcode(2)=10000;
|
||||||
if verbose
|
if verbose
|
||||||
disp([mfilename,':: NAN elements in the solution'])
|
disp([mfilename,':: NAN elements in the solution'])
|
||||||
end
|
end
|
||||||
case 2% maxiter
|
case 2% maxiter
|
||||||
retcode = 1
|
retcode = 61
|
||||||
if verbose
|
if verbose
|
||||||
disp([mfilename,':: Maximum Number of Iterations reached'])
|
disp([mfilename,':: Maximum Number of Iterations reached'])
|
||||||
end
|
end
|
||||||
case 1
|
case 1
|
||||||
BadEig=max(abs(eig(H1)))>qz_criterium;
|
BadEig=max(abs(eig(H1)))>qz_criterium;
|
||||||
if BadEig
|
if BadEig
|
||||||
retcode=3;
|
retcode=62;
|
||||||
retcode(2)=100*max(abs(eig(H1)));
|
retcode(2)=100*max(abs(eig(H1)));
|
||||||
if verbose
|
if verbose
|
||||||
disp([mfilename,':: Some eigenvalues greater than qz_criterium, Model potentially unstable'])
|
disp([mfilename,':: Some eigenvalues greater than qz_criterium, Model potentially unstable'])
|
||||||
|
|
|
@ -68,7 +68,16 @@ if ~noprint
|
||||||
error('You are estimating a DSGE-VAR model, but the value of the dsge prior weight is too low!')
|
error('You are estimating a DSGE-VAR model, but the value of the dsge prior weight is too low!')
|
||||||
case 52 %DsgeVarLikelihood
|
case 52 %DsgeVarLikelihood
|
||||||
error('');
|
error('');
|
||||||
|
case 61 %Discretionary policy
|
||||||
|
error(['Discretionary policy: maximum number of iterations has ' ...
|
||||||
|
'been reached. Procedure failed. ']);
|
||||||
|
case 62
|
||||||
|
error(['Discretionary policy: some eigenvalues greater than ' ...
|
||||||
|
'options_.qz_criterium. Model potentially unstable.']);
|
||||||
|
case 63
|
||||||
|
error(['Discretionary policy: NaN elements are present in the ' ...
|
||||||
|
'solution. Procedure failed.']);
|
||||||
|
|
||||||
% Aim Code Conversions by convertAimCodeToInfo.m
|
% Aim Code Conversions by convertAimCodeToInfo.m
|
||||||
case 102
|
case 102
|
||||||
error('Aim: roots not correctly computed by real_schur.');
|
error('Aim: roots not correctly computed by real_schur.');
|
||||||
|
|
Loading…
Reference in New Issue