Skip to content
Snippets Groups Projects
Select Git revision
  • 2aaa88caa77a5fe2bfc3a68b79169ae67ea4c06b
  • master default
  • fcst_shock_decomp
  • 4.5
  • clang+openmp
  • local_state_space_iteration_k
  • dynamic-striated
  • occbin
  • exo_steady_state
  • filter_initial_state
  • declare_vars_in_model_block
  • exceptions
  • rmExtraExo
  • julia
  • error_msg_undeclared_model_vars
  • static_aux_vars
  • slice
  • aux_func
  • penalty
  • 4.4
  • separateM_
  • 4.5.7
  • 4.5.6
  • 4.5.5
  • 4.5.4
  • 4.5.3
  • 4.5.2
  • 4.5.1
  • 4.5.0
  • 4.4.3
  • 4.4.2
  • 4.4.1
  • 4.4.0
  • 4.4-beta1
  • 4.3.3
  • 4.3.2
  • 4.3.1
  • 4.3.0
  • 4.2.5
  • 4.2.4
  • 4.2.3
41 results

GetPosteriorParametersStatistics.m

Blame
  • Forked from Dynare / dynare
    Source project has a limited visibility.
    set_default_options.m 11.03 KiB
    function options_occbin_ = set_default_options(options_occbin_,M_,flag)
    % function options_occbin_ = set_default_options(options_occbin_,M_,flag)
    % Sets default options for Occbin
    %
    % INPUTS
    % - options_occbin_ [structure]     Matlab's structure describing the current options
    % - M_              [structure]     Matlab's structure describing the model
    % - flag            [cell]          govern what/how much to initialize
    %
    % OUTPUTS
    % - options_occbin_ [structure]     Matlab's structure describing the current options
    
    % Copyright © 2021 Dynare Team
    %
    % This file is part of Dynare.
    %
    % Dynare is free software: you can redistribute it and/or modify
    % it under the terms of the GNU General Public License as published by
    % the Free Software Foundation, either version 3 of the License, or
    % (at your option) any later version.
    %
    % Dynare is distributed in the hope that it will be useful,
    % but WITHOUT ANY WARRANTY; without even the implied warranty of
    % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    % GNU General Public License for more details.
    %
    % You should have received a copy of the GNU General Public License
    % along with Dynare.  If not, see <https://www.gnu.org/licenses/>.
    
    if nargin<3
        flag='all';
    end
    
    if ismember(flag,{'all'})
        options_occbin_.solver.solve_algo=3; %solver for match_function: csolve
        options_occbin_.solver.solve_tolx=1e-10;
        options_occbin_.solver.solve_tolf=1e-5;
        options_occbin_.solver.maxit=10;
        options_occbin_.write_regimes.periods=[];
        options_occbin_.write_regimes.type='simul';
        options_occbin_.write_regimes.filename=[M_.fname '_occbin_regimes'];
    end
    
    if ismember(flag,{'filter','all'})
        options_occbin_.filter.state_covariance = false;
        options_occbin_.filter.guess_regime = false;
        options_occbin_.filter.periodic_solution = true;
        options_occbin_.filter.use_relaxation = false;
    end
    
    if ismember(flag,{'forecast','all'})
        options_occbin_.forecast.check_ahead_periods=30;
        options_occbin_.forecast.debug_flag=false;
        options_occbin_.forecast.frcst_regimes=[];
        options_occbin_.forecast.maxit=30;
        options_occbin_.forecast.qmc=0;
        options_occbin_.forecast.replic=0;
        options_occbin_.forecast.sepath=0;    
        options_occbin_.forecast.SHOCKS0=[];
        options_occbin_.forecast.treepath=1; % number of branches
    end
    
    if ismember(flag,{'irf','all'})    
        options_occbin_.irf.check_ahead_periods=30;
        options_occbin_.irf.exo_names=M_.exo_names;
        options_occbin_.irf.init_regime=[];
        options_occbin_.irf.maxit=30;
    %     options_occbin_.irf.periods=options_.irf;
        options_occbin_.irf.shocksize=[];
        options_occbin_.irf.shocksigns = {'pos','neg'};