Commit 28d30d9a authored by Houtan Bastani's avatar Houtan Bastani
Browse files

Bug fix: catch the case when a parameter follows a beta distribution with mean = std err = 0.5

parent 26dc6f7a
......@@ -317,6 +317,15 @@ EstimatedParamsStatement::EstimatedParamsStatement(const vector<EstimationParams
estim_params_list(estim_params_list_arg),
symbol_table(symbol_table_arg)
{
for (vector<EstimationParams>::const_iterator it = estim_params_list.begin();
it != estim_params_list.end(); it++)
if (it->prior == "1") //BETA_PDF is associated with "1" in DynareBison.yy
if (dynamic_cast<NumConstNode *>(it->mean)->isNumConstNodeEqualTo(0.5) &&
dynamic_cast<NumConstNode *>(it->std)->isNumConstNodeEqualTo(0.5))
{
cerr << "The prior density is not defined for the beta distribution when the mean = standard deviation = 0.5." << endl;
exit(EXIT_FAILURE);
}
}
void
......
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