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