% noprint [integer] equal to 0 if the error message has to be printed.
% DynareOptions [structure] --> options_
% OUTPUTS
% message [string] corresponding error message
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2005-2019 Dynare Team
%
% 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
switchinfo(1)
case0
message='';
case1
message='The model doesn''t determine the current variable uniquely.';
case2
message=sprintf('The generalized Schur (QZ) decomposition failed. For more information, see the documentation for Lapack function dgges: info=%d, n=%d. You can also run model_diagnostics to get more information on what may cause this problem.',info(2),info(3));
case3
message='Blanchard & Kahn conditions are not satisfied: no stable equilibrium.';
case4
message='Blanchard & Kahn conditions are not satisfied: indeterminacy.';
case5
message='Blanchard & Kahn conditions are not satisfied: indeterminacy due to rank failure.';
case6
message='The Jacobian matrix evaluated at the steady state contains elements that are not real or are infinite.';
case7
message=sprintf('One of the eigenvalues is close to 0/0 (the absolute value of numerator and denominator is smaller than %5.4f!\n If you believe that the model has a unique solution you can try to reduce the value of qz_zero_threshold.',DynareOptions.qz_zero_threshold);
message=['The Jacobian contains NaNs because the following parameters are NaN: 'disp_string];
else
message='The Jacobian contains NaNs. For more information, use options_.debug.';
end
case9
message='k_order_pert was unable to compute the solution';
case10
message='The Jacobian of the dynamic model contains Inf. For more information, use options_.debug.';
case11
message='The Hessian of the dynamic model used for second order solutions must not contain Inf';
case12
message='The Hessian of the dynamic model used for second order solutions must not contain NaN';
case19
message='The steadystate file did not compute the steady state';
case20
ifDynareOptions.linear
message=sprintf('Impossible to find the steady state (the sum of square residuals of the static equations is %5.4f). Either the model doesn''t have a steady state or there are an infinity of steady states Check whether your model is truly linear or whether there is a mistake in linearization.',info(2));
else
message=sprintf('Impossible to find the steady state (the sum of square residuals of the static equations is %5.4f). Either the model doesn''t have a steady state, there are an infinity of steady states, or the guess values are too far from the solution',info(2));
end
case21
message=sprintf('The steady state is complex (the sum of square residuals of imaginary parts of the steady state is %5.4f)',info(2));
case22
message='The steady state has NaNs or Inf.';
case23
message='Parameters have been updated in the steadystate routine and some have complex values.';
case24
message='Parameters have been updated in the steadystate routine and some are NaNs or Inf.';
case25
message='The solution to the static equations is not a steady state of the dynamic model: verify that the equations tagged by [static] and [dynamic] are consistent';
case26
message='The loglinearization of the model cannot be performed, because the steady state is not strictly positive.';
case30
message='Ergodic variance can''t be computed.';
case41
message='one (many) parameter(s) do(es) not satisfy the lower bound';
case42
message='one (many) parameter(s) do(es) not satisfy the upper bound';
case43
message='Covariance matrix of structural shocks is not positive definite';
case44%DsgeLikelihood_hh / dsge_likelihood
message='The covariance matrix of the measurement errors is not positive definite.';
case45%DsgeLikelihood_hh / dsge_likelihood
message='Likelihood is not a number (NaN) or a complex number';
case46%DsgeLikelihood_hh / dsge_likelihood
message='Likelihood is a complex number';
case47%DsgeLikelihood_hh / dsge_likelihood
message='Prior density is not a number (NaN)';
case48%DsgeLikelihood_hh / dsge_likelihood
message='Prior density is a complex number';
case49
message='The model violates one (many) endogenous prior restriction(s)';
case50
message='Likelihood is Inf';
case51
message=sprintf('\n The dsge_prior_weight is dsge_var=%5.4f, but must be at least %5.4f for the prior to be proper.\n You are estimating a DSGE-VAR model, but the value of the dsge prior weight is too low!',info(2),info(3));
case52%dsge_var_likelihood
message='You are estimating a DSGE-VAR model, but the implied covariance matrix of the VAR''s innovations, based on artificial and actual sample is not positive definite!';
case53%dsge_var_likelihood
message='You are estimating a DSGE-VAR model, but the implied covariance matrix of the VAR''s innovations, based on the artificial sample, is not positive definite!';
case55
message='Fast Kalman filter only works with stationary models [lik_init=1] or stationary observables for non-stationary models [lik_init=3]';
case61%Discretionary policy
message='Discretionary policy: maximum number of iterations has been reached. Procedure failed.';
case62
message='Discretionary policy: some eigenvalues greater than options_.qz_criterium. Model potentially unstable.';
case63
message='Discretionary policy: NaN elements are present in the solution. Procedure failed.';
case71
message='Calibrated covariance of the structural errors implies correlation larger than +-1.';
case72
message='Calibrated covariance of the measurement errors implies correlation larger than +-1.';
% Aim Code Conversions by convertAimCodeToInfo.m
case81
message=['Ramsey: The solution to the static first order conditions for optimal policy could not be found. Either the model'...
' doesn''t have a steady state, there are an infinity of steady states, '...
' or the guess values are too far from the solution'];
case82
message='Ramsey: The steady state computation resulted in NaN in the static first order conditions for optimal policy';
case83
message='Ramsey: The steady state computation resulted in NaN in the auxiliary equations for optimal policy';
case84
message='Ramsey: The steady state file computation for the Ramsey problem resulted in NaNs at the initial values of the instruments';
case85
message='Ramsey: The steady state file does not solve the static first order conditions conditional on the instruments.';
case86
message='Ramsey: The steady state file provides complex numbers conditional on the instruments.';
case87
message='Ramsey: The maximum number of iterations has been reached. Try increasing maxit.';
case102
message='Aim: roots not correctly computed by real_schur';
case103
message='Aim: too many explosive roots: no stable equilibrium';
case135
message='Aim: too many explosive roots, and q(:,right) is singular';
case104
message='Aim: too few explosive roots: indeterminacy';
case145
message='Aim: too few explosive roots, and q(:,right) is singular';
case105
message='Aim: q(:,right) is singular';
case161
message='Aim: too many exact shiftrights';
case162
message='Aim: too many numeric shiftrights';
case163
message='Aim: A is NAN or INF.';
case164
message='Aim: Problem in SPEIG.';
otherwise
message='This case shouldn''t happen. Contact the authors of Dynare';
'For more information, see the documentation for Lapack function dgges: info='...
int2str(info(2))', n='int2str(info(3))...
'. You can also run model_diagnostics to get more information on what may cause this problem.'])
case3
error('Blanchard Kahn conditions are not satisfied: no stable equilibrium')
case4
error('Blanchard Kahn conditions are not satisfied: indeterminacy')
case5
error('Blanchard Kahn conditions are not satisfied: indeterminacy due to rank failure')
case6
error('The Jacobian matrix evaluated at the steady state contains elements that are not real or are infinite')
case7
error('One of the eigenvalues is close to 0/0 (the absolute value of numerator and denominator is smaller than %s!\n If you believe that the model has a unique solution you can try to reduce the value of qz_zero_threshold.',num2str(DynareOptions.qz_zero_threshold))
error(['The Jacobian contains NaNs because the following parameters are NaN: 'disp_string])
else
error('The Jacobian contains NaNs. For more information, use options_.debug.')
end
case9
error('k_order_pert was unable to compute the solution')
case10
error('The Jacobian of the dynamic model contains Inf. For more information, use options_.debug.')
case11
error('The Hessian of the dynamic model used for second order solutions must not contain Inf')
case12
error('The Hessian of the dynamic model used for second order solutions must not contain NaN')
case19
error('The steadystate file did not compute the steady state')
case20
ifDynareOptions.linear
error(['Impossible to find the steady state. Either the model'...
' doesn''t have a steady state or there are an infinity of steady states.'...
' Check whether your model is truly linear or whether there is a mistake in linearization.'])
else
error(['Impossible to find the steady state. Either the model'...
' doesn''t have a steady state, there are an infinity of steady states,'...
' or the guess values are too far from the solution'])
end
case21
error('The steady state is complex')
case22
error('The steady state contains NaN or Inf')
case23
error('Some updated params are complex')
case24
error('Some updated params contain NaN or Inf')
case25
error('The solution to the static equations is not a steady state of the dynamic model: verify that the equations tagged by [static] and [dynamic] are consistent')
case26
error('The loglinearization of the model cannot be performed, because the steady state is not strictly positive.')
case30
error('Variance can''t be computed')
case41
error('one (many) parameter(s) do(es) not satisfy the lower bound');
case42
error('one (many) parameter(s) do(es) not satisfy the upper bound');
case43
error('Covariance matrix of structural shocks is not positive definite')
case44%DsgeLikelihood_hh / dsge_likelihood
error('The covariance matrix of the measurement errors is not positive definite.');
case45%DsgeLikelihood_hh / dsge_likelihood
error('Likelihood is not a number (NaN) or a complex number');
case46%DsgeLikelihood_hh / dsge_likelihood
error('Likelihood is a complex number');
case47%DsgeLikelihood_hh / dsge_likelihood
error('Prior density is not a number (NaN)');
case48%DsgeLikelihood_hh / dsge_likelihood
error('Prior density is a complex number');
case49
error('The model violates one (many) endogenous prior restriction(s)')
case50
error('Likelihood is Inf')
case51
fprintf('\n The dsge_prior_weight is dsge_var=%5.4f, but must be at least %5.4f for the prior to be proper.\n',info(2),info(3));
error('You are estimating a DSGE-VAR model, but the value of the dsge prior weight is too low!')
case52%dsge_var_likelihood
error('You are estimating a DSGE-VAR model, but the implied covariance matrix of the VAR''s innovations, based on artificial and actual sample is not positive definite!');
case53%dsge_var_likelihood
error('You are estimating a DSGE-VAR model, but the implied covariance matrix of the VAR''s innovations, based on the artificial sample, is not positive definite!');
case55
error('Fast Kalman filter only works with stationary models [lik_init=1] or stationary observables for non-stationary models [lik_init=3]')
case61%Discretionary policy
error('Discretionary policy: maximum number of iterations has been reached. Procedure failed.');
case62
error('Discretionary policy: some eigenvalues greater than options_.qz_criterium. Model potentially unstable.');
case63
error('Discretionary policy: NaN elements are present in the solution. Procedure failed.');
case71
error('Calibrated covariance of the structural errors implies correlation larger than +-1.');
case72
error('Calibrated covariance of the measurement errors implies correlation larger than +-1.');
% Aim Code Conversions by convertAimCodeToInfo.m
case81
error(['Ramsey: The solution to the static first order conditions for optimal policy could not be found. Either the model'...
' doesn''t have a steady state, there are an infinity of steady states, '...
' or the guess values are too far from the solution']);
case82
error('Ramsey: The steady state computation resulted in NaN in the static first order conditions for optimal policy');
case83
error('Ramsey: The steady state computation resulted in NaN in the auxiliary equations for optimal policy');
case84
error('Ramsey: The steady state file computation for the Ramsey problem resulted in NaNs at the initial values of the instruments');
case85
error('Ramsey: The steady state file does not solve the static first order conditions conditional on the instruments.');
case86
error('Ramsey: The steady state file provides complex numbers conditional on the instruments.');
case87
error('Ramsey: The maximum number of iterations has been reached. Try increasing maxit.');
case102
error('Aim: roots not correctly computed by real_schur');
case103
error('Aim: too many explosive roots: no stable equilibrium');
case135
error('Aim: too many explosive roots, and q(:,right) is singular');
case104
error('Aim: too few explosive roots: indeterminacy');
case145
error('Aim: too few explosive roots, and q(:,right) is singular');
case105
error('Aim: q(:,right) is singular');
case161
error('Aim: too many exact shiftrights');
case162
error('Aim: too many numeric shiftrights');
case163
error('Aim: A is NAN or INF.')
case164
error('Aim: Problem in SPEIG.')
otherwise
error('This case shouldn''t happen. Contact the authors of Dynare')