diff --git a/src/+gui_auxiliary/command_option_mapping.m b/src/+gui_auxiliary/command_option_mapping.m index 53c62957a0b3eaead58ece0a61d6e6775e76e8b6..0a14ebd70a4f8ce7df3a311665e7b5a1cdf7d29e 100644 --- a/src/+gui_auxiliary/command_option_mapping.m +++ b/src/+gui_auxiliary/command_option_mapping.m @@ -68,6 +68,12 @@ switch name case 'mh_nblocks' mapping = 'mh_nblck'; + case 'mh_tune_jscale' + mapping = 'mh_tune_jscale.target'; + + case 'mh_tune_guess' + mapping = 'mh_tune_jscale.guess'; + case 'mcmc_jumping_covariance' mapping = 'MCMC_jumping_covariance'; @@ -94,7 +100,7 @@ switch name case 'irf_plot_threshold' mapping = 'impulse_responses.plot_threshold'; - + otherwise mapping = name; end diff --git a/src/+gui_auxiliary/dynare_command_options_estimation.m b/src/+gui_auxiliary/dynare_command_options_estimation.m index 2fcb15f6cd3b1f70daecc5a488d5fcd089321972..772d1bbae16a94be2f99514329fa4cb25dbae1b4 100644 --- a/src/+gui_auxiliary/dynare_command_options_estimation.m +++ b/src/+gui_auxiliary/dynare_command_options_estimation.m @@ -301,6 +301,18 @@ dynare_gui_.estimation.MH_options{num,2} = '2*mh_scale'; dynare_gui_.estimation.MH_options{num,3} = 'DOUBLE'; dynare_gui_.estimation.MH_options{num,4} = 'The scale to be used for drawing the initial value of the Metropolis-Hastings chain. Default: 2*mh_scale.'; +num = num+1; +dynare_gui_.estimation.MH_options{num,1} = 'mh_tune_jscale'; +dynare_gui_.estimation.MH_options{num,2} = '0.33'; +dynare_gui_.estimation.MH_options{num,3} = 'DOUBLE'; +dynare_gui_.estimation.MH_options{num,4} = 'Automatically tunes the scale parameter of the jumping distribution’s covariance matrix (Metropolis-Hastings), so that the overall acceptance ratio is close to the desired level. Default value is 0.33. It is not possible to match exactly the desired acceptance ratio because of the stochastic nature of the algorithm (the proposals and the initial conditions of the markov chains if mh_nblocks>1). This option is only available for the Random Walk Metropolis Hastings algorithm. Must not be used in conjunction with mh_jscale = DOUBLE.'; + +num = num+1; +dynare_gui_.estimation.MH_options{num,1} = 'mh_tune_guess'; +dynare_gui_.estimation.MH_options{num,2} = '0.2'; +dynare_gui_.estimation.MH_options{num,3} = 'DOUBLE'; +dynare_gui_.estimation.MH_options{num,4} = 'Specifies the initial value for the mh_tune_jscale option. Default: 0.2. Must not be set if mh_tune_jscale is not used.'; + num = num+1; dynare_gui_.estimation.MH_options{num,1} = 'mh_recover'; dynare_gui_.estimation.MH_options{num,2} = 0; @@ -319,6 +331,12 @@ dynare_gui_.estimation.MH_options{num,2} = 0; dynare_gui_.estimation.MH_options{num,3} = 'check_option'; dynare_gui_.estimation.MH_options{num,4} = 'Tells Dynare to add to previous Metropolis-Hastings simulations instead of starting from scratch. Shouldn’t be used together with mh_recover.'; +num = num+1; +dynare_gui_.estimation.MH_options{num,1} = 'load_results_after_load_mh'; +dynare_gui_.estimation.MH_options{num,2} = 0; +dynare_gui_.estimation.MH_options{num,3} = 'check_option'; +dynare_gui_.estimation.MH_options{num,4} = 'This option is available when loading a previous MCMC run without adding additional draws, i.e. when load_mh_file is specified with mh_replic=0. It tells Dynare to load the previously computed convergence diagnostics, marginal data density, and posterior statistics from an existing _results file instead of recomputing them.'; + num = num+1; dynare_gui_.estimation.MH_options{num,1} = 'nodiagnostic'; dynare_gui_.estimation.MH_options{num,2} = 0; @@ -410,6 +428,12 @@ dynare_gui_.estimation.filter{num,2} = '1'; dynare_gui_.estimation.filter{num,3} = 'INTEGER'; dynare_gui_.estimation.filter{num,4} = 'Decide whether Dynare should automatically switch to univariate filter if a singularity is encountered in the likelihood computation (this is the behaviour if the option is equal to 1). Alternatively, if the option is equal to 0, Dynare will not automatically change the filter, but rather use a penalty value for the likelihood when such a singularity is encountered. Default: 1.'; +num = num+1; +dynare_gui_.estimation.filter{num,1} = 'keep_kalman_algo_if_singularity_is_detected'; +dynare_gui_.estimation.filter{num,2} = 0; +dynare_gui_.estimation.filter{num,3} = 'check_option'; +dynare_gui_.estimation.filter{num,4} = 'With the default use_univariate_filters_if_singularity_is_detected=1, Dynare will switch to the univariate Kalman filter when it encounters a singular forecast error variance matrix during Kalman filtering. Upon encountering such a singularity for the first time, all subsequent parameter draws and computations will automatically rely on univariate filter, i.e. Dynare will never try the multivariate filter again. Use the keep_kalman_algo_if_singularity_is_detected option to have the use_univariate_filters_if_singularity_is_detected only affect the behavior for the current draw/computation.'; + num = num+1; dynare_gui_.estimation.filter{num,1} = 'smoothed_state_uncertainty'; dynare_gui_.estimation.filter{num,2} = 0; @@ -441,7 +465,6 @@ dynare_gui_.estimation.filter{num,2} = '1e-16'; dynare_gui_.estimation.filter{num,3} = 'DOUBLE'; dynare_gui_.estimation.filter{num,4} = 'This is the convergence criterion used in the doubling algorithm to solve the Lyapunov equation. Its default value is 1e-16.'; - %% Group 6: postprocessing num = 1; dynare_gui_.estimation.postprocessing{num,1} = 'bayesian_irf'; @@ -527,12 +550,11 @@ dynare_gui_.estimation.postprocessing{num,2} = '40'; dynare_gui_.estimation.postprocessing{num,3} = 'INTEGER'; dynare_gui_.estimation.postprocessing{num,4} = 'Number of periods on which to compute the IRFs. Setting irf=0, suppresses the plotting of IRFs. Default: 40. Only used if [bayesian irf] is passed.'; -% There is no field in options_ structure for irf_shocks -% num = num+1; -% dynare_gui_.estimation.postprocessing{num,1} = 'irf_shocks'; -% dynare_gui_.estimation.postprocessing{num,2} = ''; -% dynare_gui_.estimation.postprocessing{num,3} = '( VARIABLE_NAME [[,] VARIABLE_NAME ...] )'; % special -% dynare_gui_.estimation.postprocessing{num,4} = 'The exogenous variables for which to compute IRFs. Default: all. Only used if [bayesian irf] is passed. Cannot be used with [dsge var].'; +num = num+1; +dynare_gui_.estimation.postprocessing{num,1} = 'irf_shocks'; +dynare_gui_.estimation.postprocessing{num,2} = ''; +dynare_gui_.estimation.postprocessing{num,3} = '( VARIABLE_NAME [[,] VARIABLE_NAME ...] )'; % special +dynare_gui_.estimation.postprocessing{num,4} = 'The exogenous variables for which to compute IRFs. Default: all. Only used if [bayesian irf] is passed. Cannot be used with [dsge var].'; num = num+1; dynare_gui_.estimation.postprocessing{num,1} = 'proposal_approximation'; diff --git a/src/+gui_auxiliary/set_command_option.m b/src/+gui_auxiliary/set_command_option.m index 21dc25f5e873d1bc661b8e091b650af0574208c8..4ce78ccf34802b8a789a5de620dc1cd376c268f3 100644 --- a/src/+gui_auxiliary/set_command_option.m +++ b/src/+gui_auxiliary/set_command_option.m @@ -196,6 +196,17 @@ try case 'posterior_nograph' options_.no_graph.posterior = logical(value); + + case 'irf_shocks' + if contains(value, ',') + irf_shocks_ = strsplit(value, ','); + options_.irf_shocks = irf_shocks_; + else + options_.irf_shocks = {value}; + end + + case 'keep_kalman_algo_if_singularity_is_detected' + options_.kalman.keep_kalman_algo_if_singularity_is_detected = logical(value); otherwise if isnumeric(value) diff --git a/src/gui_define_comm_options.m b/src/gui_define_comm_options.m index cab37ced2267aebf33c4c96eaf737727c22b27cd..66b8bb917d25e36a1b189897c55b1b4fff729b1d 100644 --- a/src/gui_define_comm_options.m +++ b/src/gui_define_comm_options.m @@ -242,7 +242,8 @@ handles.pushbuttonReset = uicontrol( ... tab_handles.values(ii).String = user_defined_options.(group{ii,1}); elseif strcmp(option_type, 'eps, pdf, fig, none') ... || strcmp(option_type, 'FILENAME') ... - || strcmp(option_type, 'VARIABLE_LIST') + || strcmp(option_type, 'VARIABLE_LIST') ... + || strcmp(option_type, '( VARIABLE_NAME [[,] VARIABLE_NAME ...] )') tab_handles.values(ii).String = user_defined_options.(group{ii,1}); end elseif iscell(option_type)