MS-SBVAR: bug fix
parent
7a70facdea
commit
6a0f8b4d93
|
@ -1180,6 +1180,13 @@ SvarIdentificationStatement::checkPass(ModFileStructure &mod_file_struct)
|
|||
cerr << "ERROR: You may only have one svar_identification block in your .mod file." << endl;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (upper_cholesky_present && lower_cholesky_present)
|
||||
{
|
||||
cerr << "ERROR: Within the svar_identification statement, you may only have one of "
|
||||
<< "upper_cholesky and lower_cholesky." << endl;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -668,7 +668,7 @@ det_shock_elem : VAR symbol ';' PERIODS period_list ';' VALUES value_list ';'
|
|||
{ driver.add_det_shock($2, false); }
|
||||
;
|
||||
|
||||
svar_identification : SVAR_IDENTIFICATION ';' svar_identification_list END ';'
|
||||
svar_identification : SVAR_IDENTIFICATION {driver.begin_svar_identification();} ';' svar_identification_list END ';'
|
||||
{ driver.end_svar_identification(); }
|
||||
;
|
||||
|
||||
|
|
|
@ -741,6 +741,14 @@ ParsingDriver::add_value(string *v)
|
|||
det_shocks_values.push_back(id);
|
||||
}
|
||||
|
||||
void
|
||||
ParsingDriver::begin_svar_identification()
|
||||
{
|
||||
svar_upper_cholesky = false;
|
||||
svar_lower_cholesky = false;
|
||||
svar_constants_exclusion = false;
|
||||
}
|
||||
|
||||
void
|
||||
ParsingDriver::end_svar_identification()
|
||||
{
|
||||
|
@ -749,9 +757,6 @@ ParsingDriver::end_svar_identification()
|
|||
svar_lower_cholesky,
|
||||
svar_constants_exclusion,
|
||||
mod_file->symbol_table));
|
||||
svar_upper_cholesky = false;
|
||||
svar_lower_cholesky = false;
|
||||
svar_constants_exclusion = false;
|
||||
svar_restriction_symbols.clear();
|
||||
svar_equation_restrictions.clear();
|
||||
svar_ident_exclusion_values.clear();
|
||||
|
@ -777,12 +782,6 @@ ParsingDriver::combine_lag_and_restriction(string *lag)
|
|||
delete lag;
|
||||
}
|
||||
|
||||
void
|
||||
ParsingDriver::add_constants_exclusion(void)
|
||||
{
|
||||
svar_constants_exclusion = true;
|
||||
}
|
||||
|
||||
void
|
||||
ParsingDriver::add_restriction_in_equation(string *equation)
|
||||
{
|
||||
|
@ -818,16 +817,20 @@ void
|
|||
ParsingDriver::add_upper_cholesky()
|
||||
{
|
||||
svar_upper_cholesky = true;
|
||||
svar_lower_cholesky = false;
|
||||
}
|
||||
|
||||
void
|
||||
ParsingDriver::add_lower_cholesky()
|
||||
{
|
||||
svar_upper_cholesky = false;
|
||||
svar_lower_cholesky = true;
|
||||
}
|
||||
|
||||
void
|
||||
ParsingDriver::add_constants_exclusion()
|
||||
{
|
||||
svar_constants_exclusion = true;
|
||||
}
|
||||
|
||||
void
|
||||
ParsingDriver::do_sigma_e()
|
||||
{
|
||||
|
|
|
@ -348,6 +348,7 @@ public:
|
|||
//! Add a new observed variable
|
||||
void add_varobs(string *name);
|
||||
//! Svar_Identification Statement
|
||||
void begin_svar_identification();
|
||||
void end_svar_identification();
|
||||
//! Svar_Identification Statement: match list of restrictions and equation number with lag
|
||||
void combine_lag_and_restriction(string *lag);
|
||||
|
|
Loading…
Reference in New Issue