Home > matlab > print_info.m

print_info

PURPOSE ^

Prints error messages

SYNOPSIS ^

function print_info(info,noprint)

DESCRIPTION ^

 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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function print_info(info,noprint)
0002 % Prints error messages
0003 %
0004 % INPUTS
0005 %   info    [double]   vector returned by resol.m
0006 %   noprint [integer]  equal to 0 if the error message has to be printed.
0007 % OUTPUTS
0008 %    none
0009 %
0010 % SPECIAL REQUIREMENTS
0011 %    none
0012 
0013 % Copyright (C) 2005-2011 Dynare Team
0014 %
0015 % This file is part of Dynare.
0016 %
0017 % Dynare is free software: you can redistribute it and/or modify
0018 % it under the terms of the GNU General Public License as published by
0019 % the Free Software Foundation, either version 3 of the License, or
0020 % (at your option) any later version.
0021 %
0022 % Dynare is distributed in the hope that it will be useful,
0023 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0024 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0025 % GNU General Public License for more details.
0026 %
0027 % You should have received a copy of the GNU General Public License
0028 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
0029 
0030 if ~noprint
0031     switch info(1)
0032       case 1
0033         error(['The model doesn''t determine the current variables' ...
0034                ' uniquely'])
0035       case 2
0036         error(['The generalized Schur (QZ) decomposition failed. ' ...
0037                'For more information, see the documentation for Lapack function dgges: info=' ...
0038                int2str(info(2)) ', n=' int2str(info(3))])
0039       case 3
0040         error(['Blanchard Kahn conditions are not satisfied: no stable' ...
0041                ' equilibrium'])
0042       case 4
0043         error(['Blanchard Kahn conditions are not satisfied:' ...
0044                ' indeterminacy'])
0045       case 5
0046         error(['Blanchard Kahn conditions are not satisfied:' ...
0047                ' indeterminacy due to rank failure'])
0048       case 6
0049         error(['The Jacobian matrix evaluated at the steady state contains elements ' ...
0050                'that are not real or are infinite'])
0051       case 7
0052         error(['One of the eigenvalues is close to 0/0 (the absolute ' ...
0053                'value of numerator and denominator is smaller than 1e-6)'])
0054       case 19
0055         error('The steadystate file did not compute the steady state')
0056       case 20
0057         error(['Impossible to find the steady state. Either the model' ...
0058                ' doesn''t have a unique steady state of the guess values' ...
0059                ' are too far from the solution'])
0060       case 21
0061         error('The steady state is complex')
0062       case 22
0063         error('The steady state contains NaN or Inf')
0064       case 23
0065         error('Some updated params are complex')
0066       case 24
0067         error('Some updated params contain NaN or Inf')
0068       case 30 
0069         error('Variance can''t be computed')
0070       case 41
0071         error('one (many) parameter(s) do(es) not satisfy the lower bound');
0072       case 42
0073         error('one (many) parameter(s) do(es) not satisfy the upper bound');
0074       case 43
0075         error('Covariance matrix of structural shocks is not positive definite')
0076       case 44 %DsgeLikelihood_hh / dsge_likelihood
0077         error('The covariance matrix of the measurement errors is not positive definite.');
0078       case 45 %DsgeLikelihood_hh / dsge_likelihood
0079         error('Likelihood is not a number (NaN) or a complex number');
0080       case 51
0081         error('You are estimating a DSGE-VAR model, but the value of the dsge prior weight is too low!')
0082       case 52 %DsgeVarLikelihood
0083         error('');
0084       case 61 %Discretionary policy
0085         error(['Discretionary policy: maximum number of iterations has ' ...
0086                'been reached. Procedure failed. ']);
0087       case 62
0088         error(['Discretionary policy: some eigenvalues greater than ' ...
0089                'options_.qz_criterium. Model potentially unstable.']);
0090       case 63
0091         error(['Discretionary policy: NaN elements are present in the ' ...
0092                'solution. Procedure failed.']);
0093         
0094         % Aim Code Conversions by convertAimCodeToInfo.m
0095       case 102
0096         error('Aim: roots not correctly computed by real_schur');
0097       case 103
0098         error('Aim: too many explosive roots: no stable equilibrium');
0099       case 135
0100         error('Aim: too many explosive roots, and q(:,right) is singular');
0101       case 104
0102         error('Aim: too few explosive roots: indeterminacy');
0103       case 145
0104         error('Aim: too few explosive roots, and q(:,right) is singular');
0105       case 105
0106         error('Aim: q(:,right) is singular');
0107       case 161
0108         error('Aim: too many exact shiftrights');
0109       case 162
0110         error('Aim: too many numeric shiftrights');
0111       case 163
0112         error('Aim: A is NAN or INF.')
0113       case 164
0114         error('Aim: Problem in SPEIG.')
0115       otherwise
0116         error('This case shouldn''t happen. Contact the authors of Dynare')
0117     end
0118 end

Generated on Tue 22-May-2012 02:40:23 by m2html © 2005