Verified Commit 4c71d143 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

substitute leads/lags appropriately when identification or sensitivity...

substitute leads/lags appropriately when identification or sensitivity statements are present. Issue: dynare#1631
parent a6991e83
Pipeline #555 passed with stage
in 1 minute and 46 seconds
/* /*
* Copyright (C) 2003-2018 Dynare Team * Copyright (C) 2003-2019 Dynare Team
* *
* This file is part of Dynare. * This file is part of Dynare.
* *
...@@ -1203,6 +1203,7 @@ DynareSensitivityStatement::checkPass(ModFileStructure &mod_file_struct, Warning ...@@ -1203,6 +1203,7 @@ DynareSensitivityStatement::checkPass(ModFileStructure &mod_file_struct, Warning
if (it != options_list.num_options.end() if (it != options_list.num_options.end()
&& it->second == "1") && it->second == "1")
mod_file_struct.identification_present = true; mod_file_struct.identification_present = true;
mod_file_struct.sensitivity_present = true;
} }
void void
......
/* /*
* Copyright (C) 2006-2018 Dynare Team * Copyright (C) 2006-2019 Dynare Team
* *
* This file is part of Dynare. * This file is part of Dynare.
* *
...@@ -142,6 +142,8 @@ ModFile::checkPass(bool nostrict, bool stochastic) ...@@ -142,6 +142,8 @@ ModFile::checkPass(bool nostrict, bool stochastic)
|| mod_file_struct.ramsey_policy_present || mod_file_struct.ramsey_policy_present
|| mod_file_struct.discretionary_policy_present || mod_file_struct.discretionary_policy_present
|| mod_file_struct.calib_smoother_present || mod_file_struct.calib_smoother_present
|| mod_file_struct.identification_present
|| mod_file_struct.sensitivity_present
|| stochastic; || stochastic;
// Allow empty model only when doing a standalone BVAR estimation // Allow empty model only when doing a standalone BVAR estimation
...@@ -565,6 +567,8 @@ ModFile::transformPass(bool nostrict, bool stochastic, bool compute_xrefs, const ...@@ -565,6 +567,8 @@ ModFile::transformPass(bool nostrict, bool stochastic, bool compute_xrefs, const
|| mod_file_struct.ramsey_policy_present || mod_file_struct.ramsey_policy_present
|| mod_file_struct.discretionary_policy_present || mod_file_struct.discretionary_policy_present
|| mod_file_struct.calib_smoother_present || mod_file_struct.calib_smoother_present
|| mod_file_struct.identification_present
|| mod_file_struct.sensitivity_present
|| stochastic ) || stochastic )
{ {
// In stochastic models, create auxiliary vars for leads and lags greater than 2, on both endos and exos // In stochastic models, create auxiliary vars for leads and lags greater than 2, on both endos and exos
......
/* /*
* Copyright (C) 2006-2017 Dynare Team * Copyright (C) 2006-2019 Dynare Team
* *
* This file is part of Dynare. * This file is part of Dynare.
* *
...@@ -68,6 +68,8 @@ public: ...@@ -68,6 +68,8 @@ public:
bool svar_identification_present{false}; bool svar_identification_present{false};
//! Whether an identification statement is present or the identification option of dynare_sensitivity statement is equal to one //! Whether an identification statement is present or the identification option of dynare_sensitivity statement is equal to one
bool identification_present{false}; bool identification_present{false};
//! Whether a sensitivity statement is present
bool sensitivity_present{false};
//! Whether the option analytic_derivation is given to estimation //! Whether the option analytic_derivation is given to estimation
bool estimation_analytic_derivation{false}; bool estimation_analytic_derivation{false};
//! Whether the option partial_information is given to stoch_simul/estimation/osr/ramsey_policy //! Whether the option partial_information is given to stoch_simul/estimation/osr/ramsey_policy
......
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