%
% Status : main Dynare file 
%
% Warning : this file is generated automatically by Dynare
%           from model file (.mod)

clear all
clear global
tic;
global M_ oo_ options_ ys0_ ex0_ estimation_info
options_ = [];
M_.fname = 'turkey_15';
%
% Some global variables initialization
%
global_initialization;
diary off;
logname_ = 'turkey_15.log';
if exist(logname_, 'file')
    delete(logname_)
end
diary(logname_)
M_.exo_names = 'res_lgdp_bar';
M_.exo_names_tex = 'res\_lgdp\_bar';
M_.exo_names = char(M_.exo_names, 'res_g');
M_.exo_names_tex = char(M_.exo_names_tex, 'res\_g');
M_.exo_names = char(M_.exo_names, 'res_y');
M_.exo_names_tex = char(M_.exo_names_tex, 'res\_y');
M_.exo_names = char(M_.exo_names, 'res_pie');
M_.exo_names_tex = char(M_.exo_names_tex, 'res\_pie');
M_.exo_names = char(M_.exo_names, 'res_piec');
M_.exo_names_tex = char(M_.exo_names_tex, 'res\_piec');
M_.exo_names = char(M_.exo_names, 'res_growthc');
M_.exo_names_tex = char(M_.exo_names_tex, 'res\_growthc');
M_.exo_names = char(M_.exo_names, 'res_unr_bar');
M_.exo_names_tex = char(M_.exo_names_tex, 'res\_unr\_bar');
M_.exo_names = char(M_.exo_names, 'res_unr_g');
M_.exo_names_tex = char(M_.exo_names_tex, 'res\_unr\_g');
M_.exo_names = char(M_.exo_names, 'res_unr_gap');
M_.exo_names_tex = char(M_.exo_names_tex, 'res\_unr\_gap');
M_.exo_names = char(M_.exo_names, 'res_cap_gap');
M_.exo_names_tex = char(M_.exo_names_tex, 'res\_cap\_gap');
M_.exo_names = char(M_.exo_names, 'res_cap_bar');
M_.exo_names_tex = char(M_.exo_names_tex, 'res\_cap\_bar');
M_.exo_names = char(M_.exo_names, 'res_cap_g');
M_.exo_names_tex = char(M_.exo_names_tex, 'res\_cap\_g');
M_.endo_names = 'y';
M_.endo_names_tex = 'y';
M_.endo_names = char(M_.endo_names, 'G');
M_.endo_names_tex = char(M_.endo_names_tex, 'G');
M_.endo_names = char(M_.endo_names, 'DY');
M_.endo_names_tex = char(M_.endo_names_tex, 'DY');
M_.endo_names = char(M_.endo_names, 'DY_bar');
M_.endo_names_tex = char(M_.endo_names_tex, 'DY\_bar');
M_.endo_names = char(M_.endo_names, 'pie');
M_.endo_names_tex = char(M_.endo_names_tex, 'pie');
M_.endo_names = char(M_.endo_names, 'unr');
M_.endo_names_tex = char(M_.endo_names_tex, 'unr');
M_.endo_names = char(M_.endo_names, 'unr_bar');
M_.endo_names_tex = char(M_.endo_names_tex, 'unr\_bar');
M_.endo_names = char(M_.endo_names, 'unr_g');
M_.endo_names_tex = char(M_.endo_names_tex, 'unr\_g');
M_.endo_names = char(M_.endo_names, 'unr_gap');
M_.endo_names_tex = char(M_.endo_names_tex, 'unr\_gap');
M_.endo_names = char(M_.endo_names, 'piec');
M_.endo_names_tex = char(M_.endo_names_tex, 'piec');
M_.endo_names = char(M_.endo_names, 'DCAP');
M_.endo_names_tex = char(M_.endo_names_tex, 'DCAP');
M_.endo_names = char(M_.endo_names, 'DCAP_bar');
M_.endo_names_tex = char(M_.endo_names_tex, 'DCAP\_bar');
M_.endo_names = char(M_.endo_names, 'cap_gap');
M_.endo_names_tex = char(M_.endo_names_tex, 'cap\_gap');
M_.endo_names = char(M_.endo_names, 'cap_g');
M_.endo_names_tex = char(M_.endo_names_tex, 'cap\_g');
M_.endo_names = char(M_.endo_names, 'growthc');
M_.endo_names_tex = char(M_.endo_names_tex, 'growthc');
M_.endo_names = char(M_.endo_names, 'DY_');
M_.endo_names_tex = char(M_.endo_names_tex, 'DY\_');
M_.endo_names = char(M_.endo_names, 'unr_');
M_.endo_names_tex = char(M_.endo_names_tex, 'unr\_');
M_.endo_names = char(M_.endo_names, 'pie_');
M_.endo_names_tex = char(M_.endo_names_tex, 'pie\_');
M_.endo_names = char(M_.endo_names, 'piec_');
M_.endo_names_tex = char(M_.endo_names_tex, 'piec\_');
M_.endo_names = char(M_.endo_names, 'growthc_');
M_.endo_names_tex = char(M_.endo_names_tex, 'growthc\_');
M_.endo_names = char(M_.endo_names, 'DCAP_');
M_.endo_names_tex = char(M_.endo_names_tex, 'DCAP\_');
M_.param_names = 'growth_ss';
M_.param_names_tex = 'growth\_ss';
M_.param_names = char(M_.param_names, 'phi');
M_.param_names_tex = char(M_.param_names_tex, 'phi');
M_.param_names = char(M_.param_names, 'beta');
M_.param_names_tex = char(M_.param_names_tex, 'beta');
M_.param_names = char(M_.param_names, 'lambda');
M_.param_names_tex = char(M_.param_names_tex, 'lambda');
M_.param_names = char(M_.param_names, 'unr_ss');
M_.param_names_tex = char(M_.param_names_tex, 'unr\_ss');
M_.param_names = char(M_.param_names, 'tau1');
M_.param_names_tex = char(M_.param_names_tex, 'tau1');
M_.param_names = char(M_.param_names, 'tau2');
M_.param_names_tex = char(M_.param_names_tex, 'tau2');
M_.param_names = char(M_.param_names, 'tau3');
M_.param_names_tex = char(M_.param_names_tex, 'tau3');
M_.param_names = char(M_.param_names, 'tau4');
M_.param_names_tex = char(M_.param_names_tex, 'tau4');
M_.param_names = char(M_.param_names, 'theta');
M_.param_names_tex = char(M_.param_names_tex, 'theta');
M_.param_names = char(M_.param_names, 'kappa1');
M_.param_names_tex = char(M_.param_names_tex, 'kappa1');
M_.param_names = char(M_.param_names, 'kappa2');
M_.param_names_tex = char(M_.param_names_tex, 'kappa2');
M_.param_names = char(M_.param_names, 'delta');
M_.param_names_tex = char(M_.param_names_tex, 'delta');
M_.exo_det_nbr = 0;
M_.exo_nbr = 12;
M_.endo_nbr = 21;
M_.param_nbr = 13;
M_.orig_endo_nbr = 21;
M_.aux_vars = [];
options_.varobs = [];
options_.varobs = 'DY_';
options_.varobs = char(options_.varobs, 'unr_');
options_.varobs = char(options_.varobs, 'piec_');
options_.varobs = char(options_.varobs, 'growthc_');
options_.varobs = char(options_.varobs, 'pie_');
options_.varobs = char(options_.varobs, 'DCAP_');
options_.varobs_id = [ 16 17 19 20 18 21  ];
M_.Sigma_e = zeros(12, 12);
M_.H = 0;
options_.block=0;
options_.bytecode=0;
options_.use_dll=0;
erase_compiled_function('turkey_15_static');
erase_compiled_function('turkey_15_dynamic');
M_.lead_lag_incidence = [
 1 9 0;
 2 10 0;
 0 11 0;
 0 12 0;
 3 13 30;
 0 14 0;
 4 15 0;
 5 16 0;
 6 17 0;
 0 18 0;
 0 19 0;
 0 20 0;
 7 21 0;
 8 22 0;
 0 23 0;
 0 24 0;
 0 25 0;
 0 26 0;
 0 27 0;
 0 28 0;
 0 29 0;]';
M_.nstatic = 13;
M_.nfwrd   = 0;
M_.npred   = 7;
M_.nboth   = 1;
M_.equations_tags = {
};
M_.exo_names_orig_ord = [1:12];
M_.maximum_lag = 1;
M_.maximum_lead = 1;
M_.maximum_endo_lag = 1;
M_.maximum_endo_lead = 1;
oo_.steady_state = zeros(21, 1);
M_.maximum_exo_lag = 0;
M_.maximum_exo_lead = 0;
oo_.exo_steady_state = zeros(12, 1);
M_.params = NaN(13, 1);
M_.NNZDerivatives = zeros(3, 1);
M_.NNZDerivatives(1) = 64;
M_.NNZDerivatives(2) = 0;
M_.NNZDerivatives(3) = -1;
M_.params( 5 ) = 8;
unr_ss = M_.params( 5 );
M_.params( 1 ) = 2;
growth_ss = M_.params( 1 );
M_.params( 3 ) = 0.25;
beta = M_.params( 3 );
M_.params( 6 ) = 0.1;
tau1 = M_.params( 6 );
M_.params( 7 ) = 0.1;
tau2 = M_.params( 7 );
M_.params( 8 ) = 0.1;
tau3 = M_.params( 8 );
M_.params( 9 ) = 0.1;
tau4 = M_.params( 9 );
M_.params( 10 ) = 0.1;
theta = M_.params( 10 );
M_.params( 4 ) = 0.25;
lambda = M_.params( 4 );
M_.params( 2 ) = 0.7;
phi = M_.params( 2 );
M_.params( 13 ) = 0.5;
delta = M_.params( 13 );
M_.params( 11 ) = 0.1;
kappa1 = M_.params( 11 );
M_.params( 12 ) = 1.3;
kappa2 = M_.params( 12 );
%
% INITVAL instructions
%
options_.initval_file = 0;
oo_.steady_state( 1 ) = 0;
oo_.steady_state( 9 ) = 0;
oo_.steady_state( 6 ) = M_.params(5);
oo_.steady_state( 17 ) = oo_.steady_state(6);
oo_.steady_state( 2 ) = M_.params(1);
oo_.steady_state( 3 ) = M_.params(1);
oo_.steady_state( 4 ) = M_.params(1);
oo_.steady_state( 5 ) = 0;
oo_.steady_state( 7 ) = M_.params(5);
oo_.steady_state( 8 ) = 0;
oo_.steady_state( 18 ) = oo_.steady_state(5);
oo_.steady_state( 16 ) = oo_.steady_state(3);
oo_.steady_state( 15 ) = oo_.steady_state(3);
oo_.steady_state( 20 ) = oo_.steady_state(15);
if M_.exo_nbr > 0;
	oo_.exo_simul = [ones(M_.maximum_lag,1)*oo_.exo_steady_state'];
end;
if M_.exo_det_nbr > 0;
	oo_.exo_det_simul = [ones(M_.maximum_lag,1)*oo_.exo_det_steady_state'];
end;
oo_.dr.eigval = check(M_,options_,oo_);
resid;
steady;
%
% SHOCKS instructions
%
make_ex_;
M_.exo_det_length = 0;
M_.Sigma_e(1, 1) = (0.2)^2;
M_.Sigma_e(2, 2) = (0.2)^2;
M_.Sigma_e(3, 3) = (0.8)^2;
M_.Sigma_e(4, 4) = (0.25)^2;
M_.Sigma_e(5, 5) = (0.25)^2;
M_.Sigma_e(6, 6) = (.1)^2;
M_.Sigma_e(7, 7) = (.5)^2;
M_.Sigma_e(8, 8) = (.1)^2;
M_.Sigma_e(9, 9) = (.5)^2;
M_.Sigma_e(10, 10) = (.1)^2;
M_.Sigma_e(11, 11) = (.1)^2;
M_.Sigma_e(12, 12) = (.1)^2;
M_.sigma_e_is_diagonal = 1;
global estim_params_
estim_params_.var_exo = [];
estim_params_.var_endo = [];
estim_params_.corrx = [];
estim_params_.corrn = [];
estim_params_.param_vals = [];
estim_params_.param_vals = [estim_params_.param_vals; 4, 0.25, 0, 0.6, 3, 0.25, 0.05, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 3, 0.05, 0, 1, 3, 0.05, 0.1, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 2, 0.9, 0, 1, 3, 0.9, 0.1, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 10, 0.1, 0, .3, 3, 0.1, 0.1, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 6, 0.3, 0, .5, 3, 0.3, 0.1, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 7, 0.3, 0, .5, 3, 0.3, 0.1, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 13, 0.5, 0, 2, 3, 0.5, 0.1, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 11, 0.1, 0.05, .5, 3, 0.1, 0.05, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 12, 1.3, 0, 3, 3, 1.3, 0.05, NaN, NaN, NaN ];
estim_params_.var_exo = [estim_params_.var_exo; 3, .5, 0.0005, 2, 3, .5, .05, NaN, NaN, NaN ];
estim_params_.var_exo = [estim_params_.var_exo; 1, 0.5, 0.0005, 5, 3, 0.5, .1, NaN, NaN, NaN ];
estim_params_.var_exo = [estim_params_.var_exo; 2, 0.5, 0.0005, 5, 3, 0.5, .2, NaN, NaN, NaN ];
estim_params_.var_exo = [estim_params_.var_exo; 9, 0.8, 0.0005, 10, 3, 0.8, 0.2, NaN, NaN, NaN ];
estim_params_.var_exo = [estim_params_.var_exo; 7, 0.3, 0.0005, 10, 3, 0.3, 0.2, NaN, NaN, NaN ];
estim_params_.var_exo = [estim_params_.var_exo; 8, 0.3, 0.0005, 10, 3, 0.3, 0.2, NaN, NaN, NaN ];
estim_params_.var_exo = [estim_params_.var_exo; 4, 0.5, 0.005, 3, 3, 0.5, 0.1, NaN, NaN, NaN ];
estim_params_.var_exo = [estim_params_.var_exo; 5, 1, 0.005, 3, 3, 1, 0.1, NaN, NaN, NaN ];
estim_params_.var_exo = [estim_params_.var_exo; 10, 0.2, 0.0005, 1, 3, 0.2, .1, NaN, NaN, NaN ];
estim_params_.var_exo = [estim_params_.var_exo; 11, 0.2, 0.0005, 10, 3, 0.2, .1, NaN, NaN, NaN ];
estim_params_.var_exo = [estim_params_.var_exo; 12, 0.2, 0.0005, 10, 3, 0.2, .1, NaN, NaN, NaN ];
estim_params_.var_exo = [estim_params_.var_exo; 6, 1, 0.005, 3, 3, 1, 0.05, NaN, NaN, NaN ];
options_.lik_init = 2;
options_.mh_jscale = 0.4;
options_.mh_nblck = 10;
options_.mh_replic = 14;
options_.mode_compute = 6;
options_.nograph = 1;
options_.datafile = 'turkey';
options_.order = 1;
var_list_=[];
dynare_estimation(var_list_);
save('turkey_15_results.mat', 'oo_', 'M_', 'options_');


disp(['Total computing time : ' dynsec2hms(toc) ]);
diary off
