Commit 38587195 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

MS-SBVAR: remove estimation_file_tag option

parent ff458b70
......@@ -28,14 +28,8 @@ function clean_files_for_second_type_of_mex(M_, options_, type)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
if isfield(options_.ms,'estimation_file_tag')
tagtouse = options_.ms.estimation_file_tag;
else
tagtouse = options_.ms.file_tag;
end
if ~strcmp(tagtouse, options_.ms.output_file_tag) || ...
~strcmp(M_.fname, options_.ms.output_file_tag)
tagtouse = options_.ms.file_tag;
if ~strcmp(tagtouse, options_.ms.output_file_tag)
tagtouse = options_.ms.output_file_tag;
end
......
......@@ -32,9 +32,6 @@ function options_=initialize_ms_sbvar_options(M_, options_)
% MS SBVAR
% all mex functions
options_.ms.file_tag = M_.fname;
if isfield(options_.ms,'estimation_file_tag')
options_.ms = rmfield(options_.ms,'estimation_file_tag');
end
options_.ms.create_init = 1;
if isfield(options_.ms,'free_param_file')
options_.ms = rmfield(options_.ms,'free_param_file');
......
......@@ -38,7 +38,7 @@ clean_ms_probabilities_files(options_.ms.output_file_tag);
% setup command line options
opt = ['-probabilities -seed ' num2str(options_.DynareRandomStreams.seed)];
opt = [opt ' -ft ' options_.ms.estimation_file_tag];
opt = [opt ' -ft ' options_.ms.file_tag];
opt = [opt ' -fto ' options_.ms.output_file_tag];
if options_.ms.filtered_probabilities
......
......@@ -72,6 +72,6 @@ mexErrCheck('ms_estimation', err);
[options_, oo_] = set_ms_estimation_file(options_, oo_);
[err, oo_.ms.A0, oo_.ms.Aplus, oo_.ms.Zeta, oo_.ms.Q] = ...
mex_ms_convert_free_parameters({{'file_tag',options_.ms.estimation_file_tag}}, oo_.ms.maxparams);
mex_ms_convert_free_parameters({{'file_tag',options_.ms.output_file_tag}}, oo_.ms.maxparams);
mexErrCheck('mex_ms_convert_free_parameters', err);
end
......@@ -40,7 +40,7 @@ forecastdir = [options_.ms.output_file_tag filesep 'Forecast'];
create_dir(forecastdir);
opt = { ...
{'file_tag', options_.ms.estimation_file_tag}, ...
{'file_tag', options_.ms.file_tag}, ...
{'seed', options_.DynareRandomStreams.seed}, ...
{'horizon', options_.ms.horizon}, ...
{'number_observations', options_.ms.forecast_data_obs}, ...
......
......@@ -41,7 +41,7 @@ irfdir = [options_.ms.output_file_tag filesep 'IRF'];
create_dir(irfdir);
opt = { ...
{'file_tag', options_.ms.estimation_file_tag}, ...
{'file_tag', options_.ms.file_tag}, ...
{'seed', options_.DynareRandomStreams.seed}, ...
{'horizon', options_.ms.horizon}, ...
{'filtered', options_.ms.filtered_probabilities}, ...
......
......@@ -38,7 +38,7 @@ clean_ms_simulation_files(options_.ms.output_file_tag);
% setup command line options
opt = ['-simulate -seed ' num2str(options_.DynareRandomStreams.seed)];
opt = [opt ' -ft ' options_.ms.estimation_file_tag];
opt = [opt ' -ft ' options_.ms.file_tag];
opt = [opt ' -fto ' options_.ms.output_file_tag];
opt = [opt ' -ndraws ' num2str(options_.ms.mh_replic)];
opt = [opt ' -burnin ' num2str(options_.ms.drop)];
......
......@@ -42,7 +42,7 @@ create_dir(vddir);
% NOTICE THAT VARIANCE DECOMPOSITION DEFAULTS TO USING THE MEAN, NOT MEDIAN OR BANDED
opt = {
{'file_tag', options_.ms.estimation_file_tag}, ...
{'file_tag', options_.ms.file_tag}, ...
{'seed', options_.DynareRandomStreams.seed}, ...
{'horizon', options_.ms.horizon}, ...
{'filtered', options_.ms.filtered_probabilities}, ...
......
......@@ -30,11 +30,7 @@ function [options_, oo_]=set_ms_estimation_file(options_, oo_)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
if ~isfield(options_.ms, 'estimation_file_tag')
options_.ms.estimation_file_tag = options_.ms.file_tag;
end
options_.ms.free_param_file = ['est_free_' options_.ms.estimation_file_tag '.out'];
options_.ms.free_param_file = ['est_free_' options_.ms.file_tag '.out'];
if ~exist(options_.ms.free_param_file,'file')
error(['ERROR: Could not find free parameter file: ' options_.ms.free_param_file]);
end
......
......@@ -158,7 +158,7 @@ class ParsingDriver;
%token MARKOV_SWITCHING CHAIN STATE DURATION NUMBER_OF_STATES
%token SVAR COEFFICIENTS VARIANCES CONSTANTS EQUATIONS
%token EXTERNAL_FUNCTION EXT_FUNC_NAME EXT_FUNC_NARGS FIRST_DERIV_PROVIDED SECOND_DERIV_PROVIDED
%token SELECTED_VARIABLES_ONLY COVA_COMPUTE ESTIMATION_FILE_TAG SIMULATION_FILE_TAG FILE_TAG
%token SELECTED_VARIABLES_ONLY COVA_COMPUTE SIMULATION_FILE_TAG FILE_TAG
%token NO_ERROR_BANDS ERROR_BAND_PERCENTILES SHOCKS_PER_PARAMETER NO_CREATE_INIT
%token SHOCK_DRAWS FREE_PARAMETERS MEDIAN DATA_OBS_NBR NEIGHBORHOOD_WIDTH PVALUE_KS PVALUE_CORR
%token FILTERED_PROBABILITIES FILTERED REAL_TIME_SMOOTHED
......@@ -1483,7 +1483,6 @@ sbvar : SBVAR ';'
ms_variance_decomposition_option : o_output_file_tag
| o_file_tag
| o_estimation_file_tag
| o_simulation_file_tag
| o_filtered_probabilities
| o_no_error_bands
......@@ -1507,7 +1506,6 @@ ms_variance_decomposition : MS_VARIANCE_DECOMPOSITION ';'
ms_forecast_option : o_output_file_tag
| o_file_tag
| o_estimation_file_tag
| o_simulation_file_tag
| o_data_obs_nbr
| o_no_error_bands
......@@ -1531,7 +1529,6 @@ ms_forecast : MS_FORECAST ';'
ms_irf_option : o_output_file_tag
| o_file_tag
| o_estimation_file_tag
| o_simulation_file_tag
| o_horizon
| o_filtered_probabilities
......@@ -1560,7 +1557,6 @@ ms_irf : MS_IRF ';'
ms_compute_probabilities_option : o_output_file_tag
| o_file_tag
| o_estimation_file_tag
| o_filtered_probabilities
| o_real_time_smoothed
;
......@@ -1577,7 +1573,6 @@ ms_compute_probabilities : MS_COMPUTE_PROBABILITIES ';'
ms_compute_mdd_option : o_output_file_tag
| o_file_tag
| o_estimation_file_tag
| o_simulation_file_tag
| o_proposal_type
| o_proposal_lower_bound
......@@ -1598,7 +1593,6 @@ ms_compute_mdd : MS_COMPUTE_MDD ';'
ms_simulation_option : o_output_file_tag
| o_file_tag
| o_estimation_file_tag
| o_ms_mh_replic
| o_ms_drop
| o_thinning_factor
......@@ -2104,7 +2098,6 @@ o_cova_compute : COVA_COMPUTE EQUAL INT_NUMBER
o_output_file_tag : OUTPUT_FILE_TAG EQUAL filename {driver.option_str("ms.output_file_tag", $3); };
o_file_tag : FILE_TAG EQUAL filename { driver.option_str("ms.file_tag", $3); };
o_no_create_init : NO_CREATE_INIT { driver.option_str("ms.create_init", "0"); };
o_estimation_file_tag : ESTIMATION_FILE_TAG EQUAL filename { driver.option_str("ms.estimation_file_tag", $3); };
o_simulation_file_tag : SIMULATION_FILE_TAG EQUAL filename { driver.option_str("ms.simulation_file_tag", $3); };
o_coefficients_prior_hyperparameters : COEFFICIENTS_PRIOR_HYPERPARAMETERS EQUAL vec_value
{ driver.option_num("ms.coefficients_prior_hyperparameters",$3); };
......
......@@ -325,7 +325,6 @@ string eofbuff;
<DYNARE_STATEMENT>output_file_tag {return token::OUTPUT_FILE_TAG;}
<DYNARE_STATEMENT>file_tag {return token::FILE_TAG;};
<DYNARE_STATEMENT>no_create_init {return token::NO_CREATE_INIT;};
<DYNARE_STATEMENT>estimation_file_tag {return token::ESTIMATION_FILE_TAG;};
<DYNARE_STATEMENT>simulation_file_tag {return token::SIMULATION_FILE_TAG;};
<DYNARE_STATEMENT>filtered {return token::FILTERED;}
<DYNARE_STATEMENT>horizon {return token::HORIZON;}
......
Markdown is supported
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