Commit 46a655fb authored by Houtan Bastani's avatar Houtan Bastani
Browse files

estimation: rewrite subsamples statement as an actual statement

parent 90e2de65
function subsamples_indx = get_existing_subsamples_indx(name1, name2)
% function subsamples_indx = get_existing_subsamples_indx(name1, name2)
%
% Returns the existing estimation_info.subsamples_index index
% for the name1 & name2 pair
%
% INPUTS
% name1 [string] the variable for which the subsample index is
% desired
% name2 [string] used only in case of corr(name1,name2).subsamples()
%
% OUTPUTS
% subsamples_indx [integer] existing index in the estimation_info.subsamples
% structure associated with the name pair
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2012 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
global estimation_info
if isempty(name2) % parameter or std() statement
subsamples_indx = find(strcmp(name1, estimation_info.subsamples_index) == 1);
else % corr statement
subsamples_indx = find(strcmp([name1 '_' name2], estimation_info.subsamples_index) == 1);
if isempty(subsamples_indx)
subsamples_indx = find(strcmp([name2 '_' name1], estimation_info.subsamples_index) == 1);
end
end
if size(subsamples_indx,2) ~= 1
error(['Error: Index not found for ' name1 ' ' name2]);
end
function subsamples_indx = get_new_or_existing_subsamples_indx(name1, name2)
% function subsamples_indx = get_new_or_existing_subsamples_indx(name1, name2)
%
% Returns the new estimation_info.subsamples_index index
% for the name1 & name2 pair
%
% INPUTS
% name1 [string] the variable for which the subsample was declared
% name2 [string] used only in case of corr(name1,name2).subsamples()
%
% OUTPUTS
% subsamples_indx [integer] new index in the estimation_info.subsamples
% structure associated with the name pair
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2012 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
global estimation_info
if isempty(estimation_info.subsamples_index)
subsamples_indx = 1;
return;
end
if isempty(name2) % parameter or std() statement
subsamples_indx = find(strcmp(name1, estimation_info.subsamples_index) == 1);
else % corr statement
subsamples_indx = find(strcmp([name1 '_' name2], estimation_info.subsamples_index) == 1);
if isempty(subsamples_indx)
subsamples_indx = find(strcmp([name2 '_' name1], estimation_info.subsamples_index) == 1);
end
end
if isempty(subsamples_indx)
subsamples_indx = size(estimation_info.subsamples_index, 2) + 1;
end
if size(subsamples_indx,2) > 1
error(['Error: ' name1 ' ' name2 'found more than once in estimation_info.subsamples_index']);
end
function range_indx = get_subsamples_range_indx(subsamples_indx, range_label)
% function range_indx = get_subsamples_range_indx(subsamples_indx, range_label)
%
% Returns the existing estimation_info.subsamples.range_index index
% for the range_label
%
% INPUTS
% subsamples_indx [integer] index in estimation_info.subsamples
% range_label [string] label for range
%
% OUTPUTS
% range_indx [integer] existing index in the
% estimation_info.subsamples.range_index
% structure associated with the range_label
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2012 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
global estimation_info
range_indx = find(strcmp(range_label, estimation_info.subsamples(subsamples_indx).range_index) == 1);
if size(subsamples_indx,2) ~= 1
error(['Error: Index not found in estimation_info.subsamples(' ...
name1 ').range_index for label' range_label]);
end
......@@ -243,6 +243,7 @@ options_.ramsey_policy = 0;
options_.timeless = 0;
% estimation
estimation_info.subsamples.range = struct('date1', {}, 'date2', {});
estimation_info.parameters.prior = struct('name', {}, 'shape', {}, 'mean', {}, ...
'mode', {}, 'stdev', {}, 'date1', {}, ...
'date2', {}, 'shift', {}, 'variance', {});
......@@ -258,6 +259,8 @@ estimation_info.measurement_error.prior = struct('name', {}, 'shape', {}, 'mean'
estimation_info.measurement_error_corr.prior = struct('name', {}, 'shape', {}, 'mean', {}, ...
'mode', {}, 'stdev', {}, 'date1', {}, ...
'date2', {}, 'shift', {}, 'variance', {});
estimation_info.subsamples_index = {};
estimation_info.subsamples.range_index = {};
estimation_info.parameters.prior_index = {};
estimation_info.measurement_error.prior_index = {};
estimation_info.structural_innovation.prior_index = {};
......
......@@ -1630,15 +1630,82 @@ EstimationDataStatement::writeOutput(ostream &output, const string &basename) co
output << "options_.dataset.firstobs = options_.initial_period;" << endl;
}
SubsamplesStatement::SubsamplesStatement(const string &name1_arg,
const string &name2_arg,
const subsample_declaration_map_t subsample_declaration_map_arg) :
name1(name1_arg),
name2(name2_arg),
subsample_declaration_map(subsample_declaration_map_arg)
{
}
void
SubsamplesStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings)
{
}
void
SubsamplesStatement::writeOutput(ostream &output, const string &basename) const
{
output << "subsamples_indx = get_new_or_existing_subsamples_indx('" << name1 << "','" << name2 << "');" << endl
<< "estimation_info.subsamples_index(subsamples_indx) = {'" << name1;
if (!name2.empty())
output << "_" << name2;
output << "'};" << endl
<< "estimation_info.subsamples(subsamples_indx).range = {};" << endl;
int map_indx = 1;
for (subsample_declaration_map_t::const_iterator it = subsample_declaration_map.begin();
it != subsample_declaration_map.end(); it++, map_indx++)
output << "estimation_info.subsamples(subsamples_indx).range_index(" << map_indx << ") = {'"
<< it->first << "'};" << endl
<< "estimation_info.subsamples(subsamples_indx).range(" << map_indx << ").date1 = '"
<< it->second.first << "';" << endl
<< "estimation_info.subsamples(subsamples_indx).range(" << map_indx << ").date2 = '"
<< it->second.second << "';" << endl;
}
SubsamplesEqualStatement::SubsamplesEqualStatement(const string &to_name1_arg,
const string &to_name2_arg,
const string &from_name1_arg,
const string &from_name2_arg) :
to_name1(to_name1_arg),
to_name2(to_name2_arg),
from_name1(from_name1_arg),
from_name2(from_name2_arg)
{
}
void
SubsamplesEqualStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings)
{
}
void
SubsamplesEqualStatement::writeOutput(ostream &output, const string &basename) const
{
output << "subsamples_to_indx = get_new_or_existing_subsamples_indx('" << to_name1 << "','" << to_name2 << "');" << endl
<< "estimation_info.subsamples_index(subsamples_to_indx) = {'" << to_name1;
if (!to_name2.empty())
output << "_" << to_name2;
output << "'};" << endl
<< "subsamples_from_indx = get_existing_subsamples_indx('" << from_name1 << "','" << from_name2 << "');"
<< endl
<< "estimation_info.subsamples(subsamples_to_indx) = estimation_info.subsamples(subsamples_from_indx);"
<< endl;
}
BasicPriorStatement::~BasicPriorStatement()
{
}
BasicPriorStatement::BasicPriorStatement(const string &name_arg,
const string &subsample_name_arg,
const PriorDistributions &prior_shape_arg,
const expr_t &variance_arg,
const OptionsList &options_list_arg) :
name(name_arg),
subsample_name(subsample_name_arg),
prior_shape(prior_shape_arg),
variance(variance_arg),
options_list(options_list_arg),
......@@ -1655,11 +1722,6 @@ BasicPriorStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsoli
exit(EXIT_FAILURE);
}
assert((options_list.num_options.find("date1") != options_list.num_options.end() &&
options_list.num_options.find("date2") != options_list.num_options.end()) ||
(options_list.num_options.find("date1") == options_list.num_options.end() &&
options_list.num_options.find("date2") == options_list.num_options.end()));
OptionsList::num_options_t::const_iterator it_num = options_list.num_options.find("domain");
if (it_num != options_list.num_options.end())
{
......@@ -1701,8 +1763,6 @@ BasicPriorStatement::writeCommonOutput(ostream &output, const string &lhs_field)
writeCommonOutputHelper(output, "stdev", lhs_field);
writeCommonOutputHelper(output, "shape", lhs_field);
writeCommonOutputHelper(output, "shift", lhs_field);
writeCommonOutputHelper(output, "date1", lhs_field);
writeCommonOutputHelper(output, "date2", lhs_field);
writeCommonOutputHelper(output, "domain", lhs_field);
writeCommonOutputHelper(output, "median", lhs_field);
writeCommonOutputHelper(output, "truncate", lhs_field);
......@@ -1745,16 +1805,28 @@ BasicPriorStatement::writeVarianceOption(ostream &output, const string &lhs_fiel
void
BasicPriorStatement::writeSubsampleName(ostream &output) const
{
OptionsList::date_options_t::const_iterator itd = options_list.date_options.find("subsample_name");
if (itd != options_list.date_options.end())
output << ":" << itd->second;
if (!subsample_name.empty())
output << ":" << subsample_name;
}
void
BasicPriorStatement::writeSubsampleInfo(ostream &output, const string &lhs_field, const string name1, const string name2) const
{
if (subsample_name.empty())
return;
output << "subsamples_indx = get_existing_subsamples_indx('" << name1 << "', '" << name2 << "');" << endl;
output << "range_indx = get_subsamples_range_indx(subsamples_indx, '" << subsample_name << "');" << endl;
output << "estimation_info" << lhs_field << "(prior_indx).date1 = estimation_info.subsamples(subsamples_indx).range(range_indx).date1;" << endl;
output << "estimation_info" << lhs_field << "(prior_indx).date2 = estimation_info.subsamples(subsamples_indx).range(range_indx).date2;" << endl;
}
PriorStatement::PriorStatement(const string &name_arg,
const string &subsample_name_arg,
const PriorDistributions &prior_shape_arg,
const expr_t &variance_arg,
const OptionsList &options_list_arg) :
BasicPriorStatement(name_arg, prior_shape_arg, variance_arg, options_list_arg)
BasicPriorStatement(name_arg, subsample_name_arg, prior_shape_arg, variance_arg, options_list_arg)
{
}
......@@ -1779,14 +1851,16 @@ PriorStatement::writeOutput(ostream &output, const string &basename) const
<< "estimation_info" << lhs_field <<"(prior_indx).name = '" << name << "';" << endl;
writeCommonOutput(output, lhs_field);
writeSubsampleInfo(output, lhs_field, name, "");
}
StdPriorStatement::StdPriorStatement(const string &name_arg,
const string &subsample_name_arg,
const PriorDistributions &prior_shape_arg,
const expr_t &variance_arg,
const OptionsList &options_list_arg,
const SymbolTable &symbol_table_arg ) :
BasicPriorStatement(name_arg, prior_shape_arg, variance_arg, options_list_arg),
BasicPriorStatement(name_arg, subsample_name_arg, prior_shape_arg, variance_arg, options_list_arg),
symbol_table(symbol_table_arg)
{
}
......@@ -1814,14 +1888,16 @@ StdPriorStatement::writeOutput(ostream &output, const string &basename) const
<< "estimation_info" << lhs_field << "(prior_indx).name = '" << name << "';" << endl;
writeCommonOutput(output, lhs_field);
writeSubsampleInfo(output, lhs_field, name, "");
}
CorrPriorStatement::CorrPriorStatement(const string &name_arg1, const string &name_arg2,
const string &subsample_name_arg,
const PriorDistributions &prior_shape_arg,
const expr_t &variance_arg,
const OptionsList &options_list_arg,
const SymbolTable &symbol_table_arg ) :
BasicPriorStatement(name_arg1, prior_shape_arg, variance_arg, options_list_arg),
BasicPriorStatement(name_arg1, subsample_name_arg, prior_shape_arg, variance_arg, options_list_arg),
name1(name_arg2),
symbol_table(symbol_table_arg)
{
......@@ -1858,6 +1934,7 @@ CorrPriorStatement::writeOutput(ostream &output, const string &basename) const
<< "estimation_info" << lhs_field << "(prior_indx).name2 = '" << name1 << "';" << endl;
writeCommonOutput(output, lhs_field);
writeSubsampleInfo(output, lhs_field, name, name1);
}
BasicOptionsStatement::~BasicOptionsStatement()
......@@ -1865,8 +1942,10 @@ BasicOptionsStatement::~BasicOptionsStatement()
}
BasicOptionsStatement::BasicOptionsStatement(const string &name_arg,
const OptionsList &options_list_arg) :
const string &subsample_name_arg,
const OptionsList &options_list_arg) :
name(name_arg),
subsample_name(subsample_name_arg),
options_list(options_list_arg),
first_statement_encountered(false)
{
......@@ -1875,10 +1954,6 @@ BasicOptionsStatement::BasicOptionsStatement(const string &name_arg,
void
BasicOptionsStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings)
{
assert((options_list.num_options.find("date1") != options_list.num_options.end() &&
options_list.num_options.find("date2") != options_list.num_options.end()) ||
(options_list.num_options.find("date1") == options_list.num_options.end() &&
options_list.num_options.find("date2") == options_list.num_options.end()));
}
void
......@@ -1905,8 +1980,6 @@ BasicOptionsStatement::writeCommonOutput(ostream &output, const string &lhs_fiel
writeCommonOutputHelper(output, "init", lhs_field);
writeCommonOutputHelper(output, "bounds", lhs_field);
writeCommonOutputHelper(output, "jscale", lhs_field);
writeCommonOutputHelper(output, "date1", lhs_field);
writeCommonOutputHelper(output, "date2", lhs_field);
}
void
......@@ -1926,14 +1999,26 @@ BasicOptionsStatement::writeCommonOutputHelper(ostream &output, const string &fi
void
BasicOptionsStatement::writeSubsampleName(ostream &output) const
{
OptionsList::date_options_t::const_iterator itd = options_list.date_options.find("subsample_name");
if (itd != options_list.date_options.end())
output << ":" << itd->second;
if (!subsample_name.empty())
output << ":" << subsample_name;
}
void
BasicOptionsStatement::writeSubsampleInfo(ostream &output, const string &lhs_field, const string name1, const string name2) const
{
if (subsample_name.empty())
return;
output << "subsamples_indx = get_existing_subsamples_indx('" << name1 << "', '" << name2 << "');" << endl;
output << "range_indx = get_subsamples_range_indx(subsamples_indx, '" << subsample_name << "');" << endl;
output << "estimation_info" << lhs_field << "(options_indx).date1 = estimation_info.subsamples(subsamples_indx).range(range_indx).date1;" << endl;
output << "estimation_info" << lhs_field << "(options_indx).date2 = estimation_info.subsamples(subsamples_indx).range(range_indx).date2;" << endl;
}
OptionsStatement::OptionsStatement(const string &name_arg,
const string &subsample_name_arg,
const OptionsList &options_list_arg) :
BasicOptionsStatement(name_arg, options_list_arg)
BasicOptionsStatement(name_arg, subsample_name_arg, options_list_arg)
{
}
......@@ -1958,12 +2043,14 @@ OptionsStatement::writeOutput(ostream &output, const string &basename) const
<< "estimation_info" << lhs_field << "(options_indx).name = '" << name << "';" << endl;
writeCommonOutput(output, lhs_field);
writeSubsampleInfo(output, lhs_field, name, "");
}
StdOptionsStatement::StdOptionsStatement(const string &name_arg,
const string &subsample_name_arg,
const OptionsList &options_list_arg,
const SymbolTable &symbol_table_arg ) :
BasicOptionsStatement(name_arg, options_list_arg),
BasicOptionsStatement(name_arg, subsample_name_arg, options_list_arg),
symbol_table(symbol_table_arg)
{
}
......@@ -1991,12 +2078,14 @@ StdOptionsStatement::writeOutput(ostream &output, const string &basename) const
<< "estimation_info" << lhs_field << "(options_indx).name = '" << name << "';" << endl;
writeCommonOutput(output, lhs_field);
writeSubsampleInfo(output, lhs_field, name, "");
}
CorrOptionsStatement::CorrOptionsStatement(const string &name_arg1, const string &name_arg2,
const string &subsample_name_arg,
const OptionsList &options_list_arg,
const SymbolTable &symbol_table_arg ) :
BasicOptionsStatement(name_arg1, options_list_arg),
BasicOptionsStatement(name_arg1, subsample_name_arg, options_list_arg),
name1(name_arg2),
symbol_table(symbol_table_arg)
{
......@@ -2032,4 +2121,5 @@ CorrOptionsStatement::writeOutput(ostream &output, const string &basename) const
<< "estimation_info" << lhs_field << "(options_indx).name2 = '" << name1 << "';" << endl;
writeCommonOutput(output, lhs_field);
writeSubsampleInfo(output, lhs_field, name, name1);
}
......@@ -579,17 +579,52 @@ public:
virtual void writeOutput(ostream &output, const string &basename) const;
};
class SubsamplesStatement : public Statement
{
public:
//! Storage for declaring subsamples: map<subsample_name, <date1, date2 >
typedef map<string, pair<string, string> > subsample_declaration_map_t;
private:
const string name1;
const string name2;
const subsample_declaration_map_t subsample_declaration_map;
public:
SubsamplesStatement(const string &name1_arg,
const string &name2_arg,
const subsample_declaration_map_t subsample_declaration_map_arg);
virtual void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings);
virtual void writeOutput(ostream &output, const string &basename) const;
};
class SubsamplesEqualStatement : public Statement
{
private:
const string to_name1;
const string to_name2;
const string from_name1;
const string from_name2;
public:
SubsamplesEqualStatement(const string &to_name1_arg,
const string &to_name2_arg,
const string &from_name1_arg,
const string &from_name2_arg);
virtual void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings);
virtual void writeOutput(ostream &output, const string &basename) const;
};
class BasicPriorStatement : public Statement
{
public:
virtual ~BasicPriorStatement();
protected:
const string name;
const string subsample_name;
const PriorDistributions prior_shape;
const expr_t variance;
const OptionsList options_list;
bool first_statement_encountered;
BasicPriorStatement(const string &name_arg,
const string &subsample_name_arg,
const PriorDistributions &prior_shape_arg,
const expr_t &variance_arg,
const OptionsList &options_list_arg);
......@@ -601,12 +636,14 @@ protected:
void writeCommonOutputHelper(ostream &output, const string &field, const string &lhs_field) const;
void writeShape(ostream &output, const string &lhs_field) const;
void writeSubsampleName(ostream &output) const;
void writeSubsampleInfo(ostream &output, const string &lhs_field, const string name1, const string name2) const;
};
class PriorStatement : public BasicPriorStatement
{
public:
PriorStatement(const string &name_arg,
const string &subsample_name_arg,
const PriorDistributions &prior_shape_arg,
const expr_t &variance_arg,
const OptionsList &options_list_arg);
......@@ -620,6 +657,7 @@ private:
const SymbolTable symbol_table;
public:
StdPriorStatement(const string &name_arg,
const string &subsample_name_arg,
const PriorDistributions &prior_shape_arg,
const expr_t &variance_arg,
const OptionsList &options_list_arg,
......@@ -636,6 +674,7 @@ private:
public:
CorrPriorStatement(const string &name_arg1,
const string &name_arg2,
const string &subsample_name_arg,
const PriorDistributions &prior_shape_arg,
const expr_t &variance_arg,
const OptionsList &options_list_arg,
......@@ -650,22 +689,25 @@ public:
virtual ~BasicOptionsStatement();
protected:
const string name;
const string subsample_name;
const OptionsList options_list;
bool first_statement_encountered;
BasicOptionsStatement(const string &name_arg,
const OptionsList &options_list_arg);
const string &subsample_name_arg,
const OptionsList &options_list_arg);
void get_base_name(const SymbolType symb_type, string &lhs_field) const;
virtual void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings);
void writeOptionsIndex(ostream &output, const string &lhs_field) const;
void writeCommonOutput(ostream &output, const string &lhs_field) const;
void writeCommonOutputHelper(ostream &output, const string &field, const string &lhs_field) const;
void writeSubsampleName(ostream &output) const;
void writeSubsampleInfo(ostream &output, const string &lhs_field, const string name1, const string name2) const;
};
class OptionsStatement : public BasicOptionsStatement
{
public:
OptionsStatement(const string &name_arg, const OptionsList &options_list_arg);
OptionsStatement(const string &name_arg, const string &subsample_name_arg, const OptionsList &options_list_arg);
virtual void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings);
virtual void writeOutput(ostream &output, const string &basename) const;
};
......@@ -675,8 +717,10 @@ class StdOptionsStatement : public BasicOptionsStatement
private:
const SymbolTable symbol_table;
public:
StdOptionsStatement(const string &name_arg, const OptionsList &options_list_arg,
const SymbolTable &symbol_table_arg);
StdOptionsStatement(const string &name_arg,
const string &subsample_name_arg,
const OptionsList &options_list_arg,
const SymbolTable &symbol_table_arg);
virtual void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings);
virtual void writeOutput(ostream &output, const string &basename) const;
};
......@@ -688,7 +732,9 @@ private:
const SymbolTable symbol_table;
public:
CorrOptionsStatement(const string &name_arg1, const string &name_arg2,
const OptionsList &options_list_arg, const SymbolTable &symbol_table_arg);
const string &subsample_name_arg,
const OptionsList &options_list_arg,
const SymbolTable &symbol_table_arg);
virtual void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings);
virtual void writeOutput(ostream &output, const string &basename) const;
};
......
......@@ -1250,26 +1250,17 @@ subsamples_name_list : subsamples_name_list COMMA o_subsample_name
;
prior : symbol '.' PRIOR { driver.set_prior_variance(); driver.prior_shape = eNoShape; } '(' prior_options_list ')' ';'
{ driver.set_prior($1); }
{ driver.set_prior($1, new string ("")); }
| symbol '.' symbol '.' PRIOR { driver.set_prior_variance(); driver.prior_shape = eNoShape; } '(' prior_options_list ')' ';'
{
driver.add_subsample_range(new string (*$1), new string (""), $3);
driver.set_prior($1);
}
{ driver.set_prior($1, $3); }
| STD '(' symbol ')' '.' PRIOR { driver.set_prior_variance(); driver.prior_shape = eNoShape; } '(' prior_options_list ')' ';'
{ driver.set_std_prior($3); }
{ driver.set_std_prior($3, new string ("")); }
| STD '(' symbol ')' '.' symbol '.' PRIOR { driver.set_prior_variance(); driver.prior_shape = eNoShape; } '(' prior_options_list ')' ';'
{
driver.add_subsample_range(new string (*$3), new string (""), $6);
driver.set_std_prior($3);
}
{ driver.set_std_prior($3, $6); }
| CORR '(' symbol COMMA symbol ')' '.' PRIOR { driver.set_prior_variance(); driver.prior_shape = eNoShape; } '(' prior_options_list ')' ';