From 270246acb0c3b58a76cc87babe6cb7ef0c3db736 Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Wed, 11 Oct 2017 09:57:04 +0200 Subject: [PATCH] dynare_estimation_init.m: Add debugging info on NaN and Inf parameters --- matlab/dynare_estimation_init.m | 27 ++++++++++++++ matlab/list_of_parameters_calibrated_as_Inf.m | 37 +++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 matlab/list_of_parameters_calibrated_as_Inf.m diff --git a/matlab/dynare_estimation_init.m b/matlab/dynare_estimation_init.m index ff809094a..c95e455b3 100644 --- a/matlab/dynare_estimation_init.m +++ b/matlab/dynare_estimation_init.m @@ -569,6 +569,33 @@ end if info(1) fprintf('\ndynare_estimation_init:: The steady state at the initial parameters cannot be computed.\n') + if options_.debug + M.params=params; + plist = list_of_parameters_calibrated_as_NaN(M); + if ~isempty(plist) + message = ['dynare_estimation_init:: Some of the parameters are NaN (' ]; + for i=1:size(plist,1) + if i. +idx = find(isinf(M_.params)); +nnn = length(idx); +list = []; +if nnn + list = M_.param_names(idx,:); +end \ No newline at end of file