Debian Codegraph @

tests/estimation/method_of_moments/CET/cet_slice.mod

raw
1 % -------------------------------------------------------------------------
2 % Functionality testing of Bayesian IRF matching with
3 % - slice
4 % - rotated slice with use_mh_covariance_matrix
5 % - rotated slice with slice_initialize_with_mode
6 % - reuse previous MCMC
7 % -------------------------------------------------------------------------
8
9 % Copyright © 2023 Dynare Team
10 %
11 % This file is part of Dynare.
12 %
13 % Dynare is free software: you can redistribute it and/or modify
14 % it under the terms of the GNU General Public License as published by
15 % the Free Software Foundation, either version 3 of the License, or
16 % (at your option) any later version.
17 %
18 % Dynare is distributed in the hope that it will be useful,
19 % but WITHOUT ANY WARRANTY; without even the implied warranty of
20 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 % GNU General Public License for more details.
22 %
23 % You should have received a copy of the GNU General Public License
24 % along with Dynare. If not, see <https://www.gnu.org/licenses/>.
25 @#define LESSPARAMS=1
26 @#include "cet_model.inc"
27
28 options_.prior_interval= 0.95;
29
30
31 %%%%%%%%%%%%%%%%%%%%%%%%%%
32 %% RUN 1: DEFAULT SLICE %%
33 %%%%%%%%%%%%%%%%%%%%%%%%%%
34 method_of_moments(mom_method = irf_matching
35 %, add_tiny_number_to_cholesky = 1e-14
36 %, additional_optimizer_steps = [4]
37 %, analytic_jacobian
38 %, analytic_standard_errors
39 %, bartlett_kernel_lag
40 %, bounded_shock_support
41 %, brooks_gelman_plotrows
42 %, cova_compute=0
43 %, datafile
44 %, dirname=cet_slice_default
45 %, dr
46 %, dr_cycle_reduction_tol
47 %, dr_logarithmic_reduction_maxiter
48 %, dr_logarithmic_reduction_tol
49 %, drop
50 %, first_obs
51 %, geweke_interval
52 %, graph_format
53 %, huge_number
54 , irf_matching_file = cet_irf_matching_file
55 %, k_order_solver
56 %, load_mh_file
57 %, load_results_after_load_mh
58 %, logdata
59 %, lyapunov
60 %, lyapunov_complex_threshold
61 %, lyapunov_doubling_tol
62 %, lyapunov_fixed_point_tol
63 %, mcmc_jumping_covariance
64 , mh_conf_sig = 0.90
65 %, mh_drop = 0.5
66 %, mh_init_scale_factor
67 %, mh_initialize_from_previous_mcmc
68 %, mh_initialize_from_previous_mcmc_directory
69 %, mh_initialize_from_previous_mcmc_prior
70 %, mh_initialize_from_previous_mcmc_record
71 %, mh_jscale = 0.5
72 , mh_nblocks = 1
73 %, mh_posterior_mode_estimation
74 %, mh_recover
75 , mh_replic=40 % too few draws yield error due to non positive definite covariance in the following estimations
76 %, mh_tune_guess = 0.5
77 %, mh_tune_jscale = 0.33
78 %, mom_burnin
79 %, mom_seed
80 %, mom_se_tolx
81 %, mode_check
82 %, mode_check_neighbourhood_size
83 %, mode_check_number_of_points
84 %, mode_check_symmetric_plots = 0
85 %, mode_compute = 1
86 %, mode_file = cet_original_mode
87 %, nobs
88 %, no_posterior_kernel_density
89 %, nodiagnostic
90 %, nodisplay
91 , nograph
92 %, noprint
93 %, optim
94 %, order
95 %, penalized_estimator
96 , plot_priors = 0
97 %, posterior_max_subsample_draws
98 %, posterior_sampling_method = 'random_walk_metropolis_hastings'
99 %, posterior_sampler_options = ('proposal_distribution'
100 % ,'rand_multivariate_normal'
101 % ,'rand_multivariate_student'
102 % ,'student_degrees_of_freedom',4
103 % ,'use_mh_covariance_matrix',1
104 % ,'save_tmp_file',1
105 % , scale_file
106 % )
107 %, posterior_sampling_method = 'tailored_random_block_metropolis_hastings'
108 %, posterior_sampler_options = ('proposal_distribution'
109 % ,'rand_multivariate_normal'
110 % ,'rand_multivariate_student'
111 % ,'student_degrees_of_freedom',4
112 % ,'new_block_probability',0.3
113 % ,'mode_compute',1
114 % ,optim
115 % ,'save_tmp_file',1
116 % ,scale_file
117 % )
118 %, posterior_sampling_method = 'independent_metropolis_hastings'
119 %, posterior_sampler_options = ('proposal_distribution'
120 % ,'rand_multivariate_normal'
121 % ,'rand_multivariate_student'
122 % ,'student_degrees_of_freedom',4
123 % ,'use_mh_covariance_matrix',1
124 % ,'save_tmp_file',1
125 % ,scale_file
126 % )
127 , posterior_sampling_method = 'slice'
128 %, posterior_sampler_options = ('rotated',1
129 % ,'mode_files'
130 % ,'slice_initialize_with_mode',1
131 % ,'initial_step_size',0.8
132 % ,'use_mh_covariance_matrix',1
133 % ,'save_tmp_file',0
134 % )
135 %, prefilter
136 %, prior_trunc
137 %, pruning
138 %, qz_criterium
139 %, qz_zero_threshold
140 %, raftery_lewis_diagnostics
141 %, raftery_lewis_qrs
142 %, relative_irf
143 %, replic
144 %, schur_vec_tol
145 %, silent_optimizer
146 , simulation_method = stoch_simul
147 %, simulation_multiple
148 %, sub_draws
149 %, sylvester
150 %, sylvester_fixed_point_tol
151 %, taper_steps
152 %, tex
153 %, use_penalized_objective_for_hessian
154 %, verbose
155 %, weighting_matrix
156 %, weighting_matrix_scaling_factor
157 %, xls_range
158 %, xls_sheet
159 );
160 close all;
161
162
163 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
164 %% RUN 2: ROTATED SLICE WITH USE_MH_COVARIANCE_MATRIX %%
165 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
166 method_of_moments(mom_method = irf_matching
167 , irf_matching_file = cet_irf_matching_file
168 , mh_nblocks = 1
169 , mh_replic=10
170 , plot_priors = 0
171 , nograph
172 , load_mh_file
173 , posterior_sampling_method = 'slice'
174 , posterior_sampler_options = ('rotated',1
175 % ,'mode_files'
176 % ,'slice_initialize_with_mode',1
177 % ,'initial_step_size',0.8
178 ,'use_mh_covariance_matrix',1
179 ,'save_tmp_file',0
180 )
181 );
182 close all;
183
184
185 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
186 %% RUN 3: ROTATED SLICE WITH SLICE_INITIALIZE_WITH_MODE %%
187 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
188 method_of_moments(mom_method = irf_matching
189 , irf_matching_file = cet_irf_matching_file
190 , mh_nblocks = 1
191 , mh_replic=10
192 , plot_priors = 0
193 , nograph
194 , mode_compute = 5
195 , posterior_sampling_method = 'slice'
196 , posterior_sampler_options = ('rotated',1
197 % ,'mode_files'
198 ,'slice_initialize_with_mode',1
199 % ,'initial_step_size',0.8
200 % ,'use_mh_covariance_matrix',1
201 ,'save_tmp_file',0
202 )
203 );