diff --git a/src/+gui_auxiliary/dynare_command_options_estimation.m b/src/+gui_auxiliary/dynare_command_options_estimation.m index 45c8cc74617a44557ea2aa55711f247e24452d87..bdcc007563fcc7ddea1b14b28241d44119fdce2d 100644 --- a/src/+gui_auxiliary/dynare_command_options_estimation.m +++ b/src/+gui_auxiliary/dynare_command_options_estimation.m @@ -14,7 +14,7 @@ function dynare_command_options_estimation() % SPECIAL REQUIREMENTS % none -% Copyright (C) 2003-2019 Dynare Team +% Copyright (C) 2003-2020 Dynare Team % % This file is part of Dynare. % @@ -242,6 +242,18 @@ dynare_gui_.estimation.solver{num,4} = 'Value used to test if a generalized eige %% Group 4: MH_options num = 1; +dynare_gui_.estimation.MH_options{num,1} = 'mcmc_jumping_covariance'; +dynare_gui_.estimation.MH_options{num,2} = 'hessian'; +dynare_gui_.estimation.MH_options{num,3} = {'hessian','prior_variance','identity_matrix','FILENAME'}; %special +dynare_gui_.estimation.MH_options{num,4} = 'Tells Dynare which covariance to use for the proposal density of the MCMC sampler. mcmc_jumping_covariance can be one of the following: hessian,prior_variance,identity_matrix or FILENAME. Default value is hessian.'; + +num = num+1; +dynare_gui_.estimation.MH_options{num,1} = 'mcmc_jumping_covariance_file'; +dynare_gui_.estimation.MH_options{num,2} = ''; +dynare_gui_.estimation.MH_options{num,3} = 'FILENAME'; +dynare_gui_.estimation.MH_options{num,4} = 'Tells Dynare which file with a jumping covariance matrix to use. Stored in a .mat file. Should be specified if mcmc_jumping_covariance=FILENAME'; + +num = num+1; dynare_gui_.estimation.MH_options{num,1} = 'mh_conf_sig'; dynare_gui_.estimation.MH_options{num,2} = '0.9'; dynare_gui_.estimation.MH_options{num,3} = 'DOUBLE'; @@ -307,13 +319,6 @@ 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. Shouldnt be used together with mh_recover.'; -num = num+1; -dynare_gui_.estimation.MH_options{num,1} = 'mcmc_jumping_covariance'; -dynare_gui_.estimation.MH_options{num,2} = 'hessian'; -dynare_gui_.estimation.MH_options{num,3} = {'hessian','prior_variance','identity_matrix','FILENAME'}; %special -dynare_gui_.estimation.MH_options{num,4} = 'Tells Dynare which covariance to use for the proposal density of the MCMC sampler. mcmc_jumping_covariance can be one of the following: hessian,prior_variance,identity_matrix or FILENAME. Default value is hessian.'; - - num = num+1; dynare_gui_.estimation.MH_options{num,1} = 'nodiagnostic'; dynare_gui_.estimation.MH_options{num,2} = 0; diff --git a/src/+gui_auxiliary/set_command_option.m b/src/+gui_auxiliary/set_command_option.m index 3bb14446d7b0c92f0a068278fee1fb08ccf2401c..2a71003bd82ddf34d2140b82ec5ef2c714a7a609 100644 --- a/src/+gui_auxiliary/set_command_option.m +++ b/src/+gui_auxiliary/set_command_option.m @@ -12,7 +12,7 @@ function status = set_command_option(name, value) % SPECIAL REQUIREMENTS % none -% Copyright (C) 2003-2018 Dynare Team +% Copyright (C) 2003-2020 Dynare Team % % This file is part of Dynare. % @@ -93,6 +93,20 @@ try case 'filter_step_ahead' options_.filter_step_ahead = eval(value); + case 'mcmc_jumping_covariance' + if value == 2 + options_.(gui_auxiliary.command_option_mapping(name)) = 'prior_variance'; + elseif value == 3 + options_.(gui_auxiliary.command_option_mapping(name)) = 'identity_matrix'; + elseif value == 4 + options_.(gui_auxiliary.command_option_mapping(name)) = 'FILENAME'; + end + + case 'mcmc_jumping_covariance_file' + if ~isempty(value) && strcmp(options_.MCMC_jumping_covariance, 'FILENAME') + options_.MCMC_jumping_covariance = strrep(value, '.mat', ''); + end + otherwise options_.(gui_auxiliary.command_option_mapping(name)) = value; end diff --git a/src/gui_define_comm_options.m b/src/gui_define_comm_options.m index 7427686316f2a8ce8a3ecfde800cfa6fa01e2d0d..4246f52725d6d859470eeda86d2ca5410e64b773 100644 --- a/src/gui_define_comm_options.m +++ b/src/gui_define_comm_options.m @@ -13,7 +13,7 @@ function fHandle= gui_define_comm_options(comm, comm_name) % SPECIAL REQUIREMENTS % none -% Copyright (C) 2003-2019 Dynare Team +% Copyright (C) 2003-2020 Dynare Team % % This file is part of Dynare. % @@ -321,6 +321,8 @@ handles.pushbuttonReset = uicontrol( ... file_types = {'*.m';'*.mat';'*.xls';'*.xlsx';'*.csv'}; case 'mode_file' file_types = {'*.mat'}; + case 'mcmc_jumping_covariance_file' + file_types = {'*.mat'}; end [fileName,pathName] = uigetfile(file_types,sprintf('Select %s ...', option_name));