Commit f9d57f93 authored by adjemian's avatar adjemian
Browse files

Initialization of options_ in global_initialization (dynare_estimation+stoch_simul)

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1161 ac1d8469-bf42-47a9-8791-bf33cf982152
parent a5b243b3
......@@ -22,6 +22,8 @@ function global_initialization()
options_.solve_tolx = 3.7e-11;
options_.solve_maxit = 500;
% steady state file
if exist([M_.fname '_steadystate'])
options_.steadystate_flag = 1;
else
......@@ -29,6 +31,7 @@ function global_initialization()
end
options_.steadystate_partial = [];
% subset of the estimated deep parameters
options_.ParamSubSet = 'None';
% bvar-dsge
......@@ -43,6 +46,30 @@ function global_initialization()
options_.graphics.ncols = 3;
options_.graphics.line_types = {'b-'};
options_.graphics.line_width = 1;
options_.nograph = 0;
options_.XTick = [];
options_.XTickLabel = [];
% IRFs & other stoch_simul output
options_.irf = 40;
options_.relative_irf = 0;
options_.ar = 5;
options_.simul_seed = [];
options_.hp_filter = 0;
options_.hp_ngrid = 512;
options_.nomoments = 0;
options_.nocorr = 0;
options_.periods = 0;
options_.noprint = 0;
options_.simul = 0;
options_.SpectralDensity = 0;
% TeX output
options_.TeX = 0;
% Exel
options_.xls_sheet = '';
options_.xls_range = '';
% Prior draws
options_.forecast = 0;
......@@ -55,6 +82,10 @@ function global_initialization()
options_.order = 2;
options_.dr_algo = 0;
options_.solve_algo = 2;
options_.linear = 0;
options_.replic = 50;
options_.drop = 100;
options_.simul_algo = 0;
% Ramsey policy
options_.planner_discount = 1.0;
......@@ -62,12 +93,45 @@ function global_initialization()
% estimation
options_.load_mh_file = 0;
options_.first_obs = 1;
options_.prefilter = 0;
options_.presample = 0;
options_.lik_algo = 1;
options_.lik_init = 1;
options_.mh_replic = 20000;
options_.mh_drop = 0.5;
options_.mh_jscale = 0.2;
options_.mh_init_scale = 2*options_.mh_jscale;
options_.mode_file = '';
options_.mode_compute = 4;
options_.mode_check = 0;
options_.prior_trunc = 1e-10;
options_.mh_conf_sig = 0.90;
options_.mh_mode = 1;
options_.mh_nblck = 2;
options_.load_mh_file = 0;
options_.nodiagnostic = 0;
options_.loglinear = 0;
options_.unit_root_vars = [];
options_.bayesian_irf = 0;
options_.bayesian_th_moments = 0;
options_.smoother = 0;
options_.moments_varendo = 0;
options_.filtered_vars = 0;
options_.kalman_algo = 1;
options_.kalman_tol = 1e-12;
options_.posterior_mode_estimation = 1;
options_.MaxNumberOfBytes = 1e6;
options_.filter_step_ahead = 0;
options_.diffuse_d = [];
options_.logdata = 0;
options_.use_mh_covariance_matrix = 0;
options_.noconstant = 0;
% Misc
options_.conf_sig = 0.9;
oo_.exo_simul = [];
oo_.endo_simul = [];
oo_.dr = [];
oo_.exo_det_steady_state = [];
oo_.exo_det_simul = [];
oo_.exo_det_simul = [];
\ No newline at end of file
......@@ -27,4 +27,4 @@ function y = irf(dr, e1, long, drop, replic, iorder)
y = y+(y2(:,M_.maximum_lag+drop+1:end)-y1(:,M_.maximum_lag+drop+1:end));
end
y=y/replic;
end
end
\ No newline at end of file
......@@ -108,5 +108,5 @@ function SampleAddress = selec_posterior_draws(SampleSize,info,filepath,filename
end
end
save([fname '_posterior_draws' num2str(fnum)],'pdraws')
end
end
end
\ No newline at end of file
......@@ -3,32 +3,10 @@
function info=stoch_simul(var_list)
global M_ options_ oo_ it_
options_old = options_;
options_ = set_default_option(options_,'TeX',0);
options_ = set_default_option(options_,'order',2);
options_ = set_default_option(options_,'linear',0);
options_old = options_;
if options_.linear
options_.order = 1;
end
options_ = set_default_option(options_,'ar',5);
options_ = set_default_option(options_,'irf',40);
options_ = set_default_option(options_,'relative_irf',0);
options_ = set_default_option(options_,'dr_algo',0);
options_ = set_default_option(options_,'simul_algo',0);
options_ = set_default_option(options_,'drop',100);
if options_.order == 1
options_.replic = 1;
else
options_ = set_default_option(options_,'replic',50);
end
options_ = set_default_option(options_,'nomoments',0);
options_ = set_default_option(options_,'nocorr',0);
options_ = set_default_option(options_,'simul_seed',[]);
options_ = set_default_option(options_,'hp_filter',0);
options_ = set_default_option(options_,'hp_ngrid',512);
options_ = set_default_option(options_,'simul',0);
options_ = set_default_option(options_,'periods',0);
options_ = set_default_option(options_,'noprint',0);
TeX = options_.TeX;
......@@ -272,10 +250,10 @@ function info=stoch_simul(var_list)
end
end
if isfield(options_,'SpectralDensity')
if options_.SpectralDensity == 1
[omega,f] = UnivariateSpectralDensity(oo_.dr,var_list);
[omega,f] = UnivariateSpectralDensity(oo_.dr,var_list);
end
end
options_ = options_old;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment