From 2b8869d614562698e7d5e6cca8b6c2191b1429a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien.villemot@ens.fr>
Date: Wed, 8 Aug 2012 12:39:25 +0200
Subject: [PATCH] Compute static hessian for estimation w/ analytic derivation

---
 preprocessor/ModFile.cc | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/preprocessor/ModFile.cc b/preprocessor/ModFile.cc
index 4496b65bfa..b0c588f662 100644
--- a/preprocessor/ModFile.cc
+++ b/preprocessor/ModFile.cc
@@ -377,10 +377,11 @@ ModFile::computingPass(bool no_tmp_terms)
               || mod_file_struct.estimation_present || mod_file_struct.osr_present
               || mod_file_struct.ramsey_policy_present || mod_file_struct.identification_present)
             static_model.set_cutoff_to_zero();
-          if (mod_file_struct.identification_present)
-            static_model.computingPass(global_eval_context, no_tmp_terms, true, block, byte_code);
-          else
-            static_model.computingPass(global_eval_context, no_tmp_terms, false, block, byte_code);
+
+          const bool static_hessian = mod_file_struct.identification_present
+            || mod_file_struct.estimation_analytic_derivation;
+          static_model.computingPass(global_eval_context, no_tmp_terms, static_hessian,
+                                     block, byte_code);
         }
       // Set things to compute for dynamic model
       if (mod_file_struct.simul_present || mod_file_struct.check_present
-- 
GitLab