Commit 5f5c093b authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Renamed isestimation function + Cosmetic changes.

parent feee6f8b
......@@ -122,7 +122,7 @@ if options.loglinear
for var_iter=1:length(idx)
fprintf(' - %s (%s)\n',deblank(variables_with_non_positive_steady_state(var_iter,:)), num2str(dr.ys(idx(var_iter))))
if isestimation()
if isinestimationobjective()
fprintf('You should check that the priors and/or bounds over the deep parameters are such\n')
fprintf('that the steady state levels of all the variables are strictly positive, or consider\n')
fprintf('a linearization of the model instead of a log linearization.\n')
function a = isestimation()
function b = isinestimationobjective()
% Returns 1 if we are currently estimating a model, 0 otherwise.
% Returns true iff the caller function is called by a routine defining the objective of an estimation algorithm.
% Copyright (C) 2014 Dynare Team
% Copyright (C) 2014-2017 Dynare Team
% This file is part of Dynare.
......@@ -19,7 +19,7 @@ function a = isestimation()
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <>.
a = 0;
b = false;
tmp = struct2cell(dbstack);
list_of_previously_called_routines = transpose(tmp(2,:));
......@@ -28,5 +28,5 @@ if ~isempty(strmatch('dsge_likelihood', list_of_previously_called_routines, 'exa
~isempty(strmatch('dsge_var_likelihood', list_of_previously_called_routines, 'exact')) || ...
~isempty(strmatch('non_linear_dsge_likelihood', list_of_previously_called_routines, 'exact')) || ...
~isempty(strmatch('simulated_moments_estimation', list_of_previously_called_routines, 'exact'))
a = 1;
\ No newline at end of file
b = true;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment