From 83ea804fcc3a5fc3b46a4a18e3b7e76f86178c68 Mon Sep 17 00:00:00 2001
From: Johannes Pfeifer <jpfeifer@gmx.de>
Date: Fri, 20 Aug 2021 13:31:31 +0200
Subject: [PATCH] estimation: remove invalid check for presence of constant

a zero steady state is a local property depending on the parameter vector; if initial evaluation to true, the constant was ignored
---
 matlab/dynare_estimation_init.m              | 2 +-
 matlab/method_of_moments/method_of_moments.m | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/matlab/dynare_estimation_init.m b/matlab/dynare_estimation_init.m
index c4e3f70dff..c341d7a569 100644
--- a/matlab/dynare_estimation_init.m
+++ b/matlab/dynare_estimation_init.m
@@ -621,7 +621,7 @@ end
 
 % If the steady state of the observed variables is non zero, set noconstant equal 0 ()
 if (~options_.loglinear && all(abs(oo_.steady_state(bayestopt_.mfys))<1e-9)) || (options_.loglinear && all(abs(log(oo_.steady_state(bayestopt_.mfys)))<1e-9))
-    options_.noconstant = 1;
+    options_.noconstant = 0; %identifying the constant based on just the initial parameter value is not feasible
 else
     options_.noconstant = 0;
     % If the data are prefiltered then there must not be constants in the
diff --git a/matlab/method_of_moments/method_of_moments.m b/matlab/method_of_moments/method_of_moments.m
index 30d47f7fe5..4d757afb7f 100644
--- a/matlab/method_of_moments/method_of_moments.m
+++ b/matlab/method_of_moments/method_of_moments.m
@@ -707,7 +707,7 @@ test_for_deep_parameters_calibration(M_);
 
 % If steady state of observed variables is non zero, set noconstant equal 0
 if all(abs(oo_.steady_state(oo_.dr.order_var(oo_.dr.obs_var)))<1e-9)
-    options_mom_.noconstant = 1;
+    options_mom_.noconstant = 0; %identifying the constant based on just the initial parameter value is not feasible
 else
     options_mom_.noconstant = 0;
 end
-- 
GitLab