Home > matlab > ms-sbvar > initialize_ms_sbvar_options.m

initialize_ms_sbvar_options

PURPOSE ^

function options_=initialize_ms_sbvar_options(M_, options_)

SYNOPSIS ^

function options_=initialize_ms_sbvar_options(M_, options_)

DESCRIPTION ^

 function options_=initialize_ms_sbvar_options(M_, options_)
 sets ms sbvar options back to their default values

 INPUTS
    M_:          (struct)    model structure
    options_:    (struct)    options

 OUTPUTS
    options_:    (struct)    options

 SPECIAL REQUIREMENTS
    none

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function options_=initialize_ms_sbvar_options(M_, options_)
0002 % function options_=initialize_ms_sbvar_options(M_, options_)
0003 % sets ms sbvar options back to their default values
0004 %
0005 % INPUTS
0006 %    M_:          (struct)    model structure
0007 %    options_:    (struct)    options
0008 %
0009 % OUTPUTS
0010 %    options_:    (struct)    options
0011 %
0012 % SPECIAL REQUIREMENTS
0013 %    none
0014 
0015 % Copyright (C) 2011-2012 Dynare Team
0016 %
0017 % This file is part of Dynare.
0018 %
0019 % Dynare is free software: you can redistribute it and/or modify
0020 % it under the terms of the GNU General Public License as published by
0021 % the Free Software Foundation, either version 3 of the License, or
0022 % (at your option) any later version.
0023 %
0024 % Dynare is distributed in the hope that it will be useful,
0025 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0026 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0027 % GNU General Public License for more details.
0028 %
0029 % You should have received a copy of the GNU General Public License
0030 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
0031 
0032 % MS SBVAR
0033 % all mex functions
0034 options_.ms.file_tag = M_.fname;
0035 options_.ms.create_init = 1;
0036 if isfield(options_.ms,'free_param_file')
0037     options_.ms = rmfield(options_.ms,'free_param_file');
0038 end
0039 if isfield(options_.ms,'simulation_file_tag')
0040     options_.ms = rmfield(options_.ms,'simulation_file_tag');
0041 end
0042 if isfield(options_.ms,'mh_file')
0043     options_.ms = rmfield(options_.ms,'mh_file');
0044 end
0045 if isfield(options_.ms,'output_file_tag')
0046     options_.ms = rmfield(options_.ms,'output_file_tag');
0047 end
0048 % prepare ms sbvar & estimation
0049 options_.ms.coefficients_prior_hyperparameters = [1.0 1.0 0.1 1.2 1.0 1.0];
0050 options_.ms.freq = 4;
0051 options_.ms.initial_subperiod = 1;
0052 options_.ms.final_subperiod=4;
0053 options_.ms.nlags = 1;
0054 options_.ms.cross_restrictions = 0;
0055 options_.ms.contemp_reduced_form = 0;
0056 options_.ms.bayesian_prior = 1;
0057 options_.ms.alpha = 1;
0058 options_.ms.beta = 1;
0059 options_.ms.gsig2_lmdm = 50^2;
0060 options_.ms.specification = 2;
0061 if isfield(options_.ms,'initial_year')
0062     options_.ms = rmfield(options_.ms,'initial_year');
0063 end
0064 if isfield(options_.ms,'final_year')
0065     options_.ms = rmfield(options_.ms,'final_year');
0066 end
0067 if isfield(options_,'datafile')
0068     options_ = rmfield(options_,'datafile');
0069 end
0070 % estimation
0071 options_.ms.convergence_starting_value = 1e-3;
0072 options_.ms.convergence_ending_value = 1e-6;
0073 options_.ms.convergence_increment_value = 0.1;
0074 options_.ms.max_iterations_starting_value = 50;
0075 options_.ms.max_iterations_increment_value = 2;
0076 options_.ms.max_block_iterations = 100;
0077 options_.ms.max_repeated_optimization_runs = 10;
0078 options_.ms.function_convergence_criterion = 0.1;
0079 options_.ms.parameter_convergence_criterion = 0.1;
0080 options_.ms.number_of_large_perturbations = 5;
0081 options_.ms.number_of_small_perturbations = 5;
0082 options_.ms.number_of_posterior_draws_after_perturbation = 1;
0083 options_.ms.max_number_of_stages = 20;
0084 options_.ms.random_function_convergence_criterion = 0.1;
0085 options_.ms.random_parameter_convergence_criterion = 0.1;
0086 % simulation
0087 options_.ms.mh_replic = 10000; % default differs from Dan's code
0088 options_.ms.thinning_factor = 1;
0089 options_.ms.drop = 0.1*options_.ms.mh_replic*options_.ms.thinning_factor;
0090 options_.ms.adaptive_mh_draws = 30000;
0091 % mdd
0092 options_.ms.proposal_draws = 100000;
0093 options_.ms.use_mean_center = 0;
0094 options_.ms.proposal_type = 3;
0095 options_.ms.proposal_lower_bound = 0.1;
0096 options_.ms.proposal_upper_bound = 0.9;
0097 % probabilities
0098 options_.ms.filtered_probabilities = 0;
0099 options_.ms.real_time_smoothed_probabilities = 0;
0100 % irf
0101 options_.ms.horizon = 12;
0102 options_.ms.filtered_probabilities = 0;
0103 options_.ms.percentiles = [.16 .5 .84];
0104 options_.ms.parameter_uncertainty = 0;
0105 options_.ms.shock_draws = 10000;
0106 options_.ms.shocks_per_parameter = 10;
0107 options_.ms.median = 0;
0108 options_.ms.regime = 0;
0109 options_.ms.regimes = 0;
0110 % forecast
0111 options_.ms.forecast_data_obs = 0;
0112 % variance decomposition
0113 options_.ms.error_bands = 1;
0114 end

Generated on Tue 22-May-2012 02:40:23 by m2html © 2005