diff --git a/src/+gui_auxiliary/command_option_mapping.m b/src/+gui_auxiliary/command_option_mapping.m index 4ce87e9cda31b4c5344836d362a0e7e9d2958eb3..f48f155bab239d83e9080b7bcf6f4f5c6a908626 100644 --- a/src/+gui_auxiliary/command_option_mapping.m +++ b/src/+gui_auxiliary/command_option_mapping.m @@ -80,14 +80,14 @@ switch name case 'geweke_interval' mapping = 'convergence.geweke.geweke_interval'; - case 'use_tarb' - mapping = 'TaRB.use_TaRB'; + case 'posterior_sampling_method' + mapping = 'posterior_sampler_options.posterior_sampling_method'; case 'tarb_new_block_probability' - mapping = 'TaRB.new_block_probability'; + mapping = 'posterior_sampler_options.tarb.new_block_probability'; case 'tarb_mode_compute' - mapping = 'TaRB.mode_compute'; + mapping = 'posterior_sampler_options.tarb.mode_compute'; case 'no_posterior_kernel_density' mapping = 'estimation.moments_posterior_density.indicator'; diff --git a/src/+gui_auxiliary/dynare_command_options_estimation.m b/src/+gui_auxiliary/dynare_command_options_estimation.m index bdcc007563fcc7ddea1b14b28241d44119fdce2d..14153a2322933315e6230bcdf822b880c224dcba 100644 --- a/src/+gui_auxiliary/dynare_command_options_estimation.m +++ b/src/+gui_auxiliary/dynare_command_options_estimation.m @@ -338,10 +338,16 @@ 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} = 'use_tarb'; -dynare_gui_.estimation.MH_options{num,2} = 0; -dynare_gui_.estimation.MH_options{num,3} = 'check_option'; -dynare_gui_.estimation.MH_options{num,4} = 'Instructs Dynare to use the Tailored randomized block (TaRB) Metropolis-Hastings algorithm proposed by Chib and Ramamurthy (2010) instead of the standard Random-Walk Metropolis-Hastings.'; +dynare_gui_.estimation.MH_options{num,1} = 'posterior_sampling_method'; +dynare_gui_.estimation.MH_options{num,2} = 'random_walk_metropolis_hastings'; +dynare_gui_.estimation.MH_options{num,3} = {'random_walk_metropolis_hastings', 'tailored_random_block_metropolis_hastings', 'independent_metropolis_hastings', 'slice'}; +dynare_gui_.estimation.MH_options{num,4} = "Tells Dynare which sampler method should be used to sample from the posterior distribution during Bayesian estimation. The default setting is the standard Random-Walk Metropolis-Hastings. The following alternative methods are available: Tailored randomized block (TaRB) Metropolis-Hastings algorithm proposed by Chib and Ramamurthy (2010), Independent Metropolis-Hastings algorithm where the proposal distribution does not depend on the state of the chain, Slice sampler of Planas, Ratto, and Rossi (2015). (Note that 'slice' is incompatible with prior_trunc=0.)"; + +% num = num+1; +% dynare_gui_.estimation.MH_options{num,1} = 'use_tarb'; +% dynare_gui_.estimation.MH_options{num,2} = 0; +% dynare_gui_.estimation.MH_options{num,3} = 'check_option'; +% dynare_gui_.estimation.MH_options{num,4} = 'Instructs Dynare to use the Tailored randomized block (TaRB) Metropolis-Hastings algorithm proposed by Chib and Ramamurthy (2010) instead of the standard Random-Walk Metropolis-Hastings.'; num = num+1; dynare_gui_.estimation.MH_options{num,1} = 'tarb_new_block_probability'; diff --git a/src/+gui_auxiliary/set_command_option.m b/src/+gui_auxiliary/set_command_option.m index 3c69a467011e91b2990e3847a64a72393b4c09cd..90865f06faa2c806ca60d81c987c029d7869c36c 100644 --- a/src/+gui_auxiliary/set_command_option.m +++ b/src/+gui_auxiliary/set_command_option.m @@ -116,7 +116,16 @@ try case 'mh_recover' options_.mh_recover = logical(value); - + + case 'posterior_sampling_method' + if value == 2 + eval(['options_.' gui_auxiliary.command_option_mapping(name) '= tailored_random_block_metropolis_hastings;']); + elseif value == 3 + eval(['options_.' gui_auxiliary.command_option_mapping(name) '= independent_metropolis_hastings;']); + elseif value == 4 + eval(['options_.' gui_auxiliary.command_option_mapping(name) '= slice;']); + end + otherwise if isnumeric(value) eval(['options_.' gui_auxiliary.command_option_mapping(name) '=' num2str(value) ';']);