From d44825723b7ea820c3ba2c12c9c016858b6cf3b6 Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Wed, 7 May 2014 10:49:50 +0200 Subject: [PATCH] Adds test whether all parameters are set to model_diagnostics.m --- matlab/model_diagnostics.m | 6 ++++++ matlab/test_for_deep_parameters_calibration.m | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/matlab/model_diagnostics.m b/matlab/model_diagnostics.m index 92122514f..29b56b318 100644 --- a/matlab/model_diagnostics.m +++ b/matlab/model_diagnostics.m @@ -63,6 +63,12 @@ if M.exo_nbr == 0 oo.exo_steady_state = [] ; end + +info=test_for_deep_parameters_calibration(M); +if info + problem_dummy=1; +end; + % check if ys is steady state options.debug=1; %locally set debug option to 1 [dr.ys,params,check1]=evaluate_steady_state(oo.steady_state,M,options,oo,1); diff --git a/matlab/test_for_deep_parameters_calibration.m b/matlab/test_for_deep_parameters_calibration.m index 0f5ab7aec..c5b88b40f 100644 --- a/matlab/test_for_deep_parameters_calibration.m +++ b/matlab/test_for_deep_parameters_calibration.m @@ -1,11 +1,11 @@ -function test_for_deep_parameters_calibration(M_) +function info=test_for_deep_parameters_calibration(M_) % Issues a warning is some of the parameters are NaNs. % % INPUTS % M_ [structure] Description of the (simulated or estimated) model. % % OUTPUTS -% none +% info [scalar] 0 if no problems detected, 1 otherwise % % ALGORITHM % none @@ -13,7 +13,7 @@ function test_for_deep_parameters_calibration(M_) % SPECIAL REQUIREMENTS % none -% Copyright (C) 2010 Dynare Team +% Copyright (C) 2010-2014 Dynare Team % % This file is part of Dynare. % @@ -31,6 +31,7 @@ function test_for_deep_parameters_calibration(M_) % along with Dynare. If not, see . plist = list_of_parameters_calibrated_as_NaN(M_); if ~isempty(plist) + info=1; message = ['Some of the parameters have no value (' ]; for i=1:size(plist,1) if i