diff --git a/ModFile.cc b/ModFile.cc index 9381545f806cb556edba36b6ab46ef6aa119f946..45f5ab3baa8326da5db5af9514544b929ecee4ea 100644 --- a/ModFile.cc +++ b/ModFile.cc @@ -49,6 +49,10 @@ ModFile::checkPass() it != statements.end(); it++) (*it)->checkPass(mod_file_struct); + // If order option has not been set, default to 2 + if (!mod_file_struct.order_option) + mod_file_struct.order_option = 2; + // Allow empty model only when doing a standalone BVAR estimation if (model_tree.equation_number() == 0 && (mod_file_struct.check_present diff --git a/Statement.cc b/Statement.cc index 8d385e6586daf7a99bedf2ad7b25c99e6ed5ada7..dc629b49f2128c0ffac33a3fa3c0b6b007b01dd7 100644 --- a/Statement.cc +++ b/Statement.cc @@ -23,7 +23,7 @@ ModFileStructure::ModFileStructure() : check_present(false), simul_present(false), stoch_simul_or_similar_present(false), - order_option(2) + order_option(0) { } diff --git a/include/Statement.hh b/include/Statement.hh index 41cf774e569ea4e3e42340477689a43d71ab0a2c..77dd87449da465d57c94237ff69b4cbd69147f4c 100644 --- a/include/Statement.hh +++ b/include/Statement.hh @@ -39,7 +39,8 @@ public: //! Whether a stoch_simul, estimation, osr, ramsey_policy statement is present bool stoch_simul_or_similar_present; //! The value of the "order" option of stoch_simul, estimation, osr, ramsey_policy - /*! Defaults to 2 */ + //! Derivation order + /*! First initialized to zero. If user sets order option somewhere in the MOD file, it will be equal to the maximum of order options. Otherwise will default to 2 */ int order_option; };