Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dóra Kocsis
dynare
Commits
49a51ed8
Commit
49a51ed8
authored
Dec 09, 2013
by
Sébastien Villemot
Browse files
Forbid the combination of estimation/mode_file and estimated_params_init/use_calibration
Closes #549
parent
07bea735
Changes
4
Hide whitespace changes
Inline
Side-by-side
preprocessor/ComputingTasks.cc
View file @
49a51ed8
...
...
@@ -342,6 +342,13 @@ EstimationStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsoli
cerr
<<
"ERROR: The estimation statement requires a data file to be supplied via the datafile option."
<<
endl
;
exit
(
EXIT_FAILURE
);
}
if
(
options_list
.
string_options
.
find
(
"mode_file"
)
!=
options_list
.
string_options
.
end
()
&&
mod_file_struct
.
estim_params_use_calib
)
{
cerr
<<
"ERROR: The mode_file option of the estimation statement is incompatible with the use_calibration option of the estimated_params_init block."
<<
endl
;
exit
(
EXIT_FAILURE
);
}
}
void
...
...
@@ -593,6 +600,13 @@ EstimatedParamsInitStatement::EstimatedParamsInitStatement(const vector<Estimati
{
}
void
EstimatedParamsInitStatement
::
checkPass
(
ModFileStructure
&
mod_file_struct
,
WarningConsolidation
&
warnings
)
{
if
(
use_calibration
)
mod_file_struct
.
estim_params_use_calib
=
true
;
}
void
EstimatedParamsInitStatement
::
writeOutput
(
ostream
&
output
,
const
string
&
basename
)
const
{
...
...
preprocessor/ComputingTasks.hh
View file @
49a51ed8
...
...
@@ -293,6 +293,7 @@ public:
EstimatedParamsInitStatement
(
const
vector
<
EstimationParams
>
&
estim_params_list_arg
,
const
SymbolTable
&
symbol_table_arg
,
const
bool
use_calibration_arg
);
virtual
void
checkPass
(
ModFileStructure
&
mod_file_struct
,
WarningConsolidation
&
warnings
);
virtual
void
writeOutput
(
ostream
&
output
,
const
string
&
basename
)
const
;
};
...
...
preprocessor/Statement.cc
View file @
49a51ed8
...
...
@@ -49,7 +49,8 @@ ModFileStructure::ModFileStructure() :
bayesian_irf_present
(
false
),
estimation_data_statement_present
(
false
),
last_markov_switching_chain
(
0
),
calib_smoother_present
(
false
)
calib_smoother_present
(
false
),
estim_params_use_calib
(
false
)
{
}
...
...
preprocessor/Statement.hh
View file @
49a51ed8
...
...
@@ -98,6 +98,8 @@ public:
int
last_markov_switching_chain
;
//! Whether a calib_smoother statement is present
bool
calib_smoother_present
;
//! Whether there is an estimated_params_init with use_calibration
bool
estim_params_use_calib
;
//! Set of parameters used within shocks blocks, inside the expressions
//! defining the values of covariances (stored as symbol ids)
set
<
int
>
parameters_within_shocks_values
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment