Commit 06d1f662 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Fix initialization of the fields in options_.dataset + Cosmetic changes.

parent d6cb18ab
......@@ -349,11 +349,11 @@ estimation_info.structural_innovation_corr_options_index = {};
estimation_info.structural_innovation_corr.range_index = {};
options_.initial_period = dates(1,1);
options_.dataset.file = [];
options_.dataset.firstobs = options_.initial_period;
options_.dataset.lastobs = NaN;
options_.dataset.firstobs = dates();
options_.dataset.lastobs = dates();
options_.dataset.nobs = NaN;
options_.dataset.xls_sheet = NaN;
options_.dataset.xls_range = NaN;
options_.dataset.xls_sheet = [];
options_.dataset.xls_range = [];
options_.Harvey_scale_factor = 10;
options_.MaxNumberOfBytes = 1e6;
options_.MaximumNumberOfMegaBytes = 111;
......@@ -364,7 +364,8 @@ options_.bayesian_th_moments = 0;
options_.diffuse_filter = 0;
options_.filter_step_ahead = [];
options_.filtered_vars = 0;
options_.first_obs = 1;
options_.first_obs = NaN;
options_.nobs = NaN;
options_.kalman_algo = 0;
options_.fast_kalman = 0;
options_.kalman_tol = 1e-10;
......
......@@ -1887,8 +1887,8 @@ void
EstimationDataStatement::writeOutput(ostream &output, const string &basename) const
{
options_list.writeOutput(output, "options_.dataset");
if (options_list.date_options.find("first_obs") == options_list.date_options.end())
output << "options_.dataset.first_obs = options_.initial_period;" << endl;
//if (options_list.date_options.find("first_obs") == options_list.date_options.end())
// output << "options_.dataset.first_obs = options_.initial_period;" << endl;
}
SubsamplesStatement::SubsamplesStatement(const string &name1_arg,
......
......@@ -833,7 +833,7 @@ restriction_expression : expression {driver.check_restriction_expression_constan
restriction_expression_1 : restriction_elem_expression
| restriction_expression_1 restriction_elem_expression
;
;
restriction_elem_expression : COEFF '(' symbol COMMA INT_NUMBER ')'
{ driver.add_positive_restriction_element($3,$5);}
......@@ -1366,9 +1366,9 @@ data_options_list : data_options_list COMMA data_options
;
data_options : o_file
| o_new_estimation_data_first_obs
| o_last_obs
| o_new_estimation_data_nobs
| o_data_first_obs
| o_data_last_obs
| o_data_nobs
| o_xls_sheet
| o_xls_range
;
......@@ -2505,12 +2505,9 @@ o_conditional_variance_decomposition : CONDITIONAL_VARIANCE_DECOMPOSITION EQUAL
{ driver.option_vec_int("conditional_variance_decomposition", $3); }
;
o_first_obs : FIRST_OBS EQUAL INT_NUMBER { driver.option_num("first_obs", $3); };
o_new_estimation_data_first_obs : FIRST_OBS EQUAL date_expr
{ driver.option_date("first_obs", $3); }
;
o_last_obs : LAST_OBS EQUAL date_expr
{ driver.option_date("last_obs", $3); }
;
o_data_first_obs : FIRST_OBS EQUAL date_expr { driver.option_date("firstobs", $3); } ;
o_data_last_obs : LAST_OBS EQUAL date_expr { driver.option_date("lastobs", $3); } ;
o_data_nobs : NOBS EQUAL INT_NUMBER { driver.option_num("nobs", $3); };
o_shift : SHIFT EQUAL signed_number { driver.option_num("shift", $3); };
o_shape : SHAPE EQUAL prior_distribution { driver.prior_shape = $3; };
o_mode : MODE EQUAL signed_number { driver.option_num("mode", $3); };
......@@ -2523,7 +2520,6 @@ o_bounds : BOUNDS EQUAL vec_value_w_inf { driver.option_num("bounds", $3); };
o_domain : DOMAINN EQUAL vec_value { driver.option_num("domain", $3); };
o_interval : INTERVAL EQUAL vec_value { driver.option_num("interval", $3); };
o_variance : VARIANCE EQUAL expression { driver.set_prior_variance($3); }
o_new_estimation_data_nobs : NOBS EQUAL INT_NUMBER { driver.option_num("nobs", $3); };
o_prefilter : PREFILTER EQUAL INT_NUMBER { driver.option_num("prefilter", $3); };
o_presample : PRESAMPLE EQUAL INT_NUMBER { driver.option_num("presample", $3); };
o_lik_algo : LIK_ALGO EQUAL INT_NUMBER { driver.option_num("lik_algo", $3); };
......
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