diff --git a/src/+gui_auxiliary/dynare_command_options_estimation.m b/src/+gui_auxiliary/dynare_command_options_estimation.m index d75e5dd3fa445e155609499725c5ec434f8bb0a3..203308e4934738b6df5489a5d8515096fe9e7f77 100644 --- a/src/+gui_auxiliary/dynare_command_options_estimation.m +++ b/src/+gui_auxiliary/dynare_command_options_estimation.m @@ -337,6 +337,18 @@ dynare_gui_.estimation.MH_options{num,2} = '[0.2 0.5]'; dynare_gui_.estimation.MH_options{num,3} = '[DOUBLE DOUBLE]'; %special dynare_gui_.estimation.MH_options{num,4} = 'Percentage of MCMC draws at the beginning and end of the MCMC chain taken to compute the Geweke (1992,1999) convergence diagnostics (requires [mh nblocks]=1) after discarding the first [mh drop], page 54 percent of draws as a burnin. Default: [0.2 0.5].'; +num = num+1; +dynare_gui_.estimation.MH_options{num,1} = 'raftery_lewis_diagnostics'; +dynare_gui_.estimation.MH_options{num,2} = 0; +dynare_gui_.estimation.MH_options{num,3} = 'check_option'; +dynare_gui_.estimation.MH_options{num,4} = 'Triggers the computation of the Raftery and Lewis (1992) convergence diagnostics. The goal is deliver the number of draws required to estimate a particular quantile of the CDF q with precision r with a probability s. Typically, one wants to estimate the q=0.025 percentile (corresponding to a 95 percent HPDI) with a precision of 0.5 percent (r=0.005) with 95 percent certainty (s=0.95). The defaults can be changed via raftery_lewis_qrs.'; + +num = num+1; +dynare_gui_.estimation.MH_options{num,1} = 'raftery_lewis_qrs'; +dynare_gui_.estimation.MH_options{num,2} = '[0.025 0.005 0.95]'; +dynare_gui_.estimation.MH_options{num,3} = '[DOUBLE DOUBLE DOUBLE]'; %special +dynare_gui_.estimation.MH_options{num,4} = 'Sets the quantile of the CDF q that is estimated with precision r with a probability s in the Raftery and Lewis (1992) convergence diagnostics. Default: [0.025 0.005 0.95].'; + num = num+1; dynare_gui_.estimation.MH_options{num,1} = 'posterior_sampling_method'; dynare_gui_.estimation.MH_options{num,2} = 'random_walk_metropolis_hastings'; @@ -581,6 +593,12 @@ dynare_gui_.estimation.output{num,2} = 0; dynare_gui_.estimation.output{num,3} = 'check_option'; dynare_gui_.estimation.output{num,4} = 'Do not display the graphs, but still save them to disk (unless nograph is used).'; +num = num+1; +dynare_gui_.estimation.output{num,1} = 'posterior_nograph'; +dynare_gui_.estimation.output{num,2} = 0; +dynare_gui_.estimation.output{num,3} = 'check_option'; +dynare_gui_.estimation.output{num,4} = 'Suppresses the generation of graphs associated with Bayesian IRFs (bayesian_irf), posterior smoothed objects (smoother), and posterior forecasts (forecast).'; + num = num+1; dynare_gui_.estimation.output{num,1} = 'graph_format'; dynare_gui_.estimation.output{num,2} = 'eps'; diff --git a/src/+gui_auxiliary/set_command_option.m b/src/+gui_auxiliary/set_command_option.m index be1e35f4f0a5262097d16fb805330f268f2572db..b57cbbd2342d7c4ad42bc416a3cb98b04d1c678e 100644 --- a/src/+gui_auxiliary/set_command_option.m +++ b/src/+gui_auxiliary/set_command_option.m @@ -117,6 +117,12 @@ try case 'mh_recover' options_.mh_recover = logical(value); + case 'raftery_lewis_diagnostics' + options_.convergence.rafterylewis.indicator = logical(value); + + case 'raftery_lewis_qrs' + options_.convergence.rafterylewis.qrs = str2num(value); + case 'posterior_sampling_method' if value == 2 options_.posterior_sampler_options.posterior_sampling_method = 'tailored_random_block_metropolis_hastings'; @@ -173,6 +179,9 @@ try options_.particle.proposal_approximation.montecarlo = true; end + case 'posterior_nograph' + options_.no_graph.posterior = logical(value); + otherwise if isnumeric(value) eval(['options_.' gui_auxiliary.command_option_mapping(name) '=' num2str(value) ';']); diff --git a/src/gui_define_comm_options.m b/src/gui_define_comm_options.m index 0683e89864697d4837a26cc18b1d9ef3c5631bba..cab37ced2267aebf33c4c96eaf737727c22b27cd 100644 --- a/src/gui_define_comm_options.m +++ b/src/gui_define_comm_options.m @@ -236,7 +236,8 @@ handles.pushbuttonReset = uicontrol( ... tab_handles.values(ii).String = num2str(user_defined_options.(group{ii,1}), 15); elseif strcmp(option_type, '[INTEGER1:INTEGER2]') ... || strcmp(option_type, 'INTEGER or [INTEGER1:INTEGER2]') ... - || strcmp(option_type, '[DOUBLE DOUBLE]') + || strcmp(option_type, '[DOUBLE DOUBLE]') ... + || strcmp(option_type, '[DOUBLE DOUBLE DOUBLE]') tab_handles.values(ii).Value = str2double(user_defined_options.(group{ii,1})); tab_handles.values(ii).String = user_defined_options.(group{ii,1}); elseif strcmp(option_type, 'eps, pdf, fig, none') ... @@ -351,7 +352,7 @@ handles.pushbuttonReset = uicontrol( ... return end switch option_type - case {'INTEGER', 'INTEGER or [INTEGER1:INTEGER2]','[INTEGER1:INTEGER2]', 'DOUBLE', '[DOUBLE DOUBLE]', '[INTEGER1 INTEGER2 ...]', ... + case {'INTEGER', 'INTEGER or [INTEGER1:INTEGER2]','[INTEGER1:INTEGER2]', 'DOUBLE', '[DOUBLE DOUBLE]', '[DOUBLE DOUBLE DOUBLE]', '[INTEGER1 INTEGER2 ...]', ... 'INTEGER or [INTEGER1:INTEGER2] or [INTEGER1 INTEGER2 ...]', '[INTEGER1:INTEGER2] or [INTEGER1 INTEGER2 ...]'} [num, status] = str2num(value); if strcmp(option_type,'[DOUBLE DOUBLE]') @@ -359,6 +360,11 @@ handles.pushbuttonReset = uicontrol( ... status = 0; end end + if strcmp(option_type,'[DOUBLE DOUBLE DOUBLE]') + if(size(num,1)~= 1 || size(num,2)~= 3) + status = 0; + end + end if strcmp(option_type,'[INTEGER1 INTEGER2 ...]') if(size(num,1)~= 1 || size(num,2) < 2) status = 0;