2009-12-16 18:17:34 +01:00
|
|
|
function print_info(info,noprint)
|
|
|
|
% Prints error messages
|
|
|
|
%
|
|
|
|
% INPUTS
|
|
|
|
% info [double] vector returned by resol.m
|
|
|
|
% noprint [integer] equal to 0 if the error message has to be printed.
|
|
|
|
% OUTPUTS
|
|
|
|
% none
|
|
|
|
%
|
|
|
|
% SPECIAL REQUIREMENTS
|
|
|
|
% none
|
|
|
|
|
2012-06-08 18:22:34 +02:00
|
|
|
% Copyright (C) 2005-2012 Dynare Team
|
2009-12-16 18:17:34 +01:00
|
|
|
%
|
|
|
|
% This file is part of Dynare.
|
|
|
|
%
|
|
|
|
% Dynare is free software: you can redistribute it and/or modify
|
|
|
|
% it under the terms of the GNU General Public License as published by
|
|
|
|
% the Free Software Foundation, either version 3 of the License, or
|
|
|
|
% (at your option) any later version.
|
|
|
|
%
|
|
|
|
% Dynare is distributed in the hope that it will be useful,
|
|
|
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
% GNU General Public License for more details.
|
|
|
|
%
|
|
|
|
% You should have received a copy of the GNU General Public License
|
|
|
|
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
if ~noprint
|
|
|
|
switch info(1)
|
|
|
|
case 1
|
|
|
|
error(['The model doesn''t determine the current variables' ...
|
|
|
|
' uniquely'])
|
|
|
|
case 2
|
2011-08-29 18:03:26 +02:00
|
|
|
error(['The generalized Schur (QZ) decomposition failed. ' ...
|
|
|
|
'For more information, see the documentation for Lapack function dgges: info=' ...
|
|
|
|
int2str(info(2)) ', n=' int2str(info(3))])
|
2009-12-16 18:17:34 +01:00
|
|
|
case 3
|
|
|
|
error(['Blanchard Kahn conditions are not satisfied: no stable' ...
|
|
|
|
' equilibrium'])
|
|
|
|
case 4
|
|
|
|
error(['Blanchard Kahn conditions are not satisfied:' ...
|
|
|
|
' indeterminacy'])
|
|
|
|
case 5
|
|
|
|
error(['Blanchard Kahn conditions are not satisfied:' ...
|
|
|
|
' indeterminacy due to rank failure'])
|
|
|
|
case 6
|
2011-08-18 22:22:23 +02:00
|
|
|
error(['The Jacobian matrix evaluated at the steady state contains elements ' ...
|
2011-08-19 17:20:40 +02:00
|
|
|
'that are not real or are infinite'])
|
2011-09-01 11:37:40 +02:00
|
|
|
case 7
|
2011-11-18 22:12:36 +01:00
|
|
|
error(['One of the eigenvalues is close to 0/0 (the absolute ' ...
|
2011-10-13 17:14:41 +02:00
|
|
|
'value of numerator and denominator is smaller than 1e-6)'])
|
2012-08-05 13:09:24 +02:00
|
|
|
case 8
|
|
|
|
if ~isempty(info(2))
|
|
|
|
global M_;
|
|
|
|
disp_string=deblank(M_.param_names(info(2),:));
|
|
|
|
for ii=1:length(info)-2
|
|
|
|
disp_string=[disp_string,', ',deblank(M_.param_names(info(2+ii),:))];
|
|
|
|
end
|
|
|
|
error(['The Jacobian contains NaNs because the following parameters are NaN: '...
|
|
|
|
disp_string])
|
|
|
|
else
|
|
|
|
error(['The Jacobian contains NaNs'])
|
|
|
|
end
|
|
|
|
|
|
|
|
case 19
|
2011-10-13 17:14:41 +02:00
|
|
|
error('The steadystate file did not compute the steady state')
|
2009-12-16 18:17:34 +01:00
|
|
|
case 20
|
|
|
|
error(['Impossible to find the steady state. Either the model' ...
|
|
|
|
' doesn''t have a unique steady state of the guess values' ...
|
|
|
|
' are too far from the solution'])
|
|
|
|
case 21
|
2011-10-13 17:14:41 +02:00
|
|
|
error('The steady state is complex')
|
2011-06-13 18:41:58 +02:00
|
|
|
case 22
|
2011-10-13 17:14:41 +02:00
|
|
|
error('The steady state contains NaN or Inf')
|
2011-06-13 18:41:58 +02:00
|
|
|
case 23
|
2011-10-13 17:14:41 +02:00
|
|
|
error('Some updated params are complex')
|
2011-06-13 18:41:58 +02:00
|
|
|
case 24
|
2011-10-13 17:14:41 +02:00
|
|
|
error('Some updated params contain NaN or Inf')
|
2012-06-14 15:11:36 +02:00
|
|
|
case 30
|
2009-12-16 18:17:34 +01:00
|
|
|
error('Variance can''t be computed')
|
2011-02-04 15:42:24 +01:00
|
|
|
case 41
|
|
|
|
error('one (many) parameter(s) do(es) not satisfy the lower bound');
|
|
|
|
case 42
|
|
|
|
error('one (many) parameter(s) do(es) not satisfy the upper bound');
|
2010-10-14 12:03:36 +02:00
|
|
|
case 43
|
2012-04-20 23:13:50 +02:00
|
|
|
error('Covariance matrix of structural shocks is not positive definite')
|
2011-12-26 15:39:27 +01:00
|
|
|
case 44 %DsgeLikelihood_hh / dsge_likelihood
|
2012-01-30 14:03:24 +01:00
|
|
|
error('The covariance matrix of the measurement errors is not positive definite.');
|
2012-01-30 18:03:44 +01:00
|
|
|
case 45 %DsgeLikelihood_hh / dsge_likelihood
|
|
|
|
error('Likelihood is not a number (NaN) or a complex number');
|
2012-06-14 15:11:36 +02:00
|
|
|
case 46 %DsgeLikelihood_hh / dsge_likelihood
|
|
|
|
error('Likelihood is a complex number');
|
|
|
|
case 47 %DsgeLikelihood_hh / dsge_likelihood
|
|
|
|
error('Prior density is not a number (NaN)');
|
|
|
|
case 48 %DsgeLikelihood_hh / dsge_likelihood
|
|
|
|
error('Prior density is a complex number');
|
2010-06-24 12:53:10 +02:00
|
|
|
case 51
|
|
|
|
error('You are estimating a DSGE-VAR model, but the value of the dsge prior weight is too low!')
|
2011-02-04 15:42:24 +01:00
|
|
|
case 52 %DsgeVarLikelihood
|
|
|
|
error('');
|
2011-04-05 13:46:58 +02:00
|
|
|
case 61 %Discretionary policy
|
2012-06-14 15:11:36 +02:00
|
|
|
error(['Discretionary policy: maximum number of iterations has been reached. Procedure failed. ']);
|
2011-04-05 13:46:58 +02:00
|
|
|
case 62
|
2012-06-14 15:11:36 +02:00
|
|
|
error(['Discretionary policy: some eigenvalues greater than options_.qz_criterium. Model potentially unstable.']);
|
2011-04-05 13:46:58 +02:00
|
|
|
case 63
|
2012-06-14 15:11:36 +02:00
|
|
|
error(['Discretionary policy: NaN elements are present in the solution. Procedure failed.']);
|
2011-02-04 17:17:48 +01:00
|
|
|
% Aim Code Conversions by convertAimCodeToInfo.m
|
2011-02-04 15:42:24 +01:00
|
|
|
case 102
|
2011-10-13 17:14:41 +02:00
|
|
|
error('Aim: roots not correctly computed by real_schur');
|
2011-02-04 15:42:24 +01:00
|
|
|
case 103
|
2012-04-20 22:32:56 +02:00
|
|
|
error('Aim: too many explosive roots: no stable equilibrium');
|
2011-02-04 15:42:24 +01:00
|
|
|
case 135
|
2012-04-20 22:32:56 +02:00
|
|
|
error('Aim: too many explosive roots, and q(:,right) is singular');
|
2011-02-04 15:42:24 +01:00
|
|
|
case 104
|
2012-04-20 22:32:56 +02:00
|
|
|
error('Aim: too few explosive roots: indeterminacy');
|
2011-02-04 15:42:24 +01:00
|
|
|
case 145
|
2012-04-20 22:32:56 +02:00
|
|
|
error('Aim: too few explosive roots, and q(:,right) is singular');
|
2011-02-04 15:42:24 +01:00
|
|
|
case 105
|
2011-10-13 17:14:41 +02:00
|
|
|
error('Aim: q(:,right) is singular');
|
2011-02-04 15:42:24 +01:00
|
|
|
case 161
|
2011-10-13 17:14:41 +02:00
|
|
|
error('Aim: too many exact shiftrights');
|
2011-02-04 15:42:24 +01:00
|
|
|
case 162
|
2011-10-13 17:14:41 +02:00
|
|
|
error('Aim: too many numeric shiftrights');
|
2012-04-20 22:32:56 +02:00
|
|
|
case 163
|
|
|
|
error('Aim: A is NAN or INF.')
|
|
|
|
case 164
|
|
|
|
error('Aim: Problem in SPEIG.')
|
2009-12-16 18:17:34 +01:00
|
|
|
otherwise
|
|
|
|
error('This case shouldn''t happen. Contact the authors of Dynare')
|
|
|
|
end
|
2011-08-29 18:03:26 +02:00
|
|
|
end
|