Commit e91f0776 authored by MichelJuillard's avatar MichelJuillard
Browse files

discretionary policy: made returned info values compatible with Dynare

parent abf9a0ee
......@@ -95,24 +95,24 @@ while 1
H10=H1;
F10=F1;
end
retcode=rcode-1;
switch retcode
retcode = 0;
switch rcode
case 3 % nan
retcode=3;
retcode=63;
retcode(2)=10000;
if verbose
disp([mfilename,':: NAN elements in the solution'])
end
case 2% maxiter
retcode = 1
retcode = 61
if verbose
disp([mfilename,':: Maximum Number of Iterations reached'])
end
case 1
BadEig=max(abs(eig(H1)))>qz_criterium;
if BadEig
retcode=3;
retcode=62;
retcode(2)=100*max(abs(eig(H1)));
if verbose
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!')
case 52 %DsgeVarLikelihood
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
case 102
error('Aim: roots not correctly computed by real_schur.');
......
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