print_info.m 4.26 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
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

13
% Copyright (C) 2005-2011 Dynare Team
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
%
% 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
Houtan Bastani's avatar
Houtan Bastani committed
36
37
38
        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))])
39
40
41
42
43
44
45
46
47
48
      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
49
        error(['The Jacobian matrix evaluated at the steady state contains elements ' ...
50
               'that are not real or are infinite'])
51
52
53
      case 7
        error(['One of the eigenvalue is is close to 0/0 (the absolute ' ...
               'value of numerator and denominator is smaller than 1e-6).'])
54
55
56
57
58
59
60
61
      case 19
        error('The steadystate file did not compute the steady state (inconsistent deep parameters).')
      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
        error('The steady state is complex.')
62
      case 22
MichelJuillard's avatar
MichelJuillard committed
63
        error('The steady state contains NaN.')
64
65
66
67
      case 23
        error('Some updated params are complex.')
      case 24
        error('Some updated params contain NaN.')
68
69
      case 30 
        error('Variance can''t be computed')
70
71
72
73
      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');
74
75
      case 43
        error('Covariance matrix of shocks is not positive definite')
76
77
      case 44 %DsgeLikelihood_hh / DsgeLikelihood
        error('');
78
79
      case 51
        error('You are estimating a DSGE-VAR model, but the value of the dsge prior weight is too low!')
80
81
      case 52 %DsgeVarLikelihood
        error('');
82
83
84
85
86
87
88
89
90
91
      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.']);
        
92
        % Aim Code Conversions by convertAimCodeToInfo.m
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
      case 102
        error('Aim: roots not correctly computed by real_schur.');
      case 103
        error('Aim: too many big roots.');
      case 135
        error('Aim: too many big roots, and q(:,right) is singular.');
      case 104
        error('Aim: too few big roots.');
      case 145
        error('Aim: too few big roots, and q(:,right) is singular.');
      case 105
        error('Aim: q(:,right) is singular.');
      case 161
        error('Aim: too many exact shiftrights.');
      case 162
        error('Aim: too many numeric shiftrights.');
109
110
111
      otherwise
        error('This case shouldn''t happen. Contact the authors of Dynare')
    end
Houtan Bastani's avatar
Houtan Bastani committed
112
end