


function [options_, oo_]=ms_simulation(M_, options_, oo_)
Markov-switching SBVAR: Simulation
INPUTS
M_: (struct) model structure
options_: (struct) options
oo_: (struct) results
OUTPUTS
options_: (struct) options
oo_: (struct) results
SPECIAL REQUIREMENTS
none

0001 function [options_, oo_]=ms_simulation(M_, options_, oo_) 0002 % function [options_, oo_]=ms_simulation(M_, options_, oo_) 0003 % Markov-switching SBVAR: Simulation 0004 % 0005 % INPUTS 0006 % M_: (struct) model structure 0007 % options_: (struct) options 0008 % oo_: (struct) results 0009 % 0010 % OUTPUTS 0011 % options_: (struct) options 0012 % oo_: (struct) results 0013 % 0014 % SPECIAL REQUIREMENTS 0015 % none 0016 0017 % Copyright (C) 2011 Dynare Team 0018 % 0019 % This file is part of Dynare. 0020 % 0021 % Dynare is free software: you can redistribute it and/or modify 0022 % it under the terms of the GNU General Public License as published by 0023 % the Free Software Foundation, either version 3 of the License, or 0024 % (at your option) any later version. 0025 % 0026 % Dynare is distributed in the hope that it will be useful, 0027 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0028 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0029 % GNU General Public License for more details. 0030 % 0031 % You should have received a copy of the GNU General Public License 0032 % along with Dynare. If not, see <http://www.gnu.org/licenses/>. 0033 0034 disp('MS-SBVAR Simulation'); 0035 options_ = set_file_tags(options_); 0036 clean_ms_simulation_files(options_.ms.output_file_tag); 0037 [options_, oo_] = set_ms_estimation_file(options_.ms.file_tag, options_, oo_); 0038 0039 % setup command line options 0040 opt = ['-simulate -seed ' num2str(options_.DynareRandomStreams.seed)]; 0041 opt = [opt ' -ft ' options_.ms.file_tag]; 0042 opt = [opt ' -fto ' options_.ms.output_file_tag]; 0043 opt = [opt ' -ndraws ' num2str(options_.ms.mh_replic)]; 0044 opt = [opt ' -burnin ' num2str(options_.ms.drop)]; 0045 opt = [opt ' -thin ' num2str(options_.ms.thinning_factor)]; 0046 opt = [opt ' -mh ' num2str(options_.ms.adaptive_mh_draws)]; 0047 0048 % simulation 0049 [err] = ms_sbvar_command_line(opt); 0050 mexErrCheck('ms_simulation',err); 0051 end