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

tic0 = tic;
% Define global variables.
global M_ options_ oo_ estim_params_ bayestopt_ dataset_ dataset_info estimation_info ys0_ ex0_
options_ = [];
M_.fname = 'dsge_humancapital';
M_.dynare_version = '4.6-unstable-7a08b73ddf500a18dffff2cd1e24d977fe54ca06';
oo_.dynare_version = '4.6-unstable-7a08b73ddf500a18dffff2cd1e24d977fe54ca06';
options_.dynare_version = '4.6-unstable-7a08b73ddf500a18dffff2cd1e24d977fe54ca06';
%
% Some global variables initialization
%
global_initialization;
diary off;
diary('dsge_humancapital.log');
M_.endo_names = 'Y';
M_.endo_names_tex = 'Y';
M_.endo_names_long = 'Y';
M_.endo_names = char(M_.endo_names, 'C');
M_.endo_names_tex = char(M_.endo_names_tex, 'C');
M_.endo_names_long = char(M_.endo_names_long, 'C');
M_.endo_names = char(M_.endo_names, 'IK');
M_.endo_names_tex = char(M_.endo_names_tex, 'IK');
M_.endo_names_long = char(M_.endo_names_long, 'IK');
M_.endo_names = char(M_.endo_names, 'IHP');
M_.endo_names_tex = char(M_.endo_names_tex, 'IHP');
M_.endo_names_long = char(M_.endo_names_long, 'IHP');
M_.endo_names = char(M_.endo_names, 'H');
M_.endo_names_tex = char(M_.endo_names_tex, 'H');
M_.endo_names_long = char(M_.endo_names_long, 'H');
M_.endo_names = char(M_.endo_names, 'L');
M_.endo_names_tex = char(M_.endo_names_tex, 'L');
M_.endo_names_long = char(M_.endo_names_long, 'L');
M_.endo_names = char(M_.endo_names, 'K');
M_.endo_names_tex = char(M_.endo_names_tex, 'K');
M_.endo_names_long = char(M_.endo_names_long, 'K');
M_.endo_names = char(M_.endo_names, 'w');
M_.endo_names_tex = char(M_.endo_names_tex, 'w');
M_.endo_names_long = char(M_.endo_names_long, 'w');
M_.endo_names = char(M_.endo_names, 'rk');
M_.endo_names_tex = char(M_.endo_names_tex, 'rk');
M_.endo_names_long = char(M_.endo_names_long, 'rk');
M_.endo_names = char(M_.endo_names, 'R');
M_.endo_names_tex = char(M_.endo_names_tex, 'R');
M_.endo_names_long = char(M_.endo_names_long, 'R');
M_.endo_names = char(M_.endo_names, 'IH');
M_.endo_names_tex = char(M_.endo_names_tex, 'IH');
M_.endo_names_long = char(M_.endo_names_long, 'IH');
M_.endo_names = char(M_.endo_names, 'IHG');
M_.endo_names_tex = char(M_.endo_names_tex, 'IHG');
M_.endo_names_long = char(M_.endo_names_long, 'IHG');
M_.endo_partitions = struct();
M_.param_names = 'beta';
M_.param_names_tex = 'beta';
M_.param_names_long = 'beta';
M_.param_names = char(M_.param_names, 'deltak');
M_.param_names_tex = char(M_.param_names_tex, 'deltak');
M_.param_names_long = char(M_.param_names_long, 'deltak');
M_.param_names = char(M_.param_names, 'rho');
M_.param_names_tex = char(M_.param_names_tex, 'rho');
M_.param_names_long = char(M_.param_names_long, 'rho');
M_.param_names = char(M_.param_names, 'sigma');
M_.param_names_tex = char(M_.param_names_tex, 'sigma');
M_.param_names_long = char(M_.param_names_long, 'sigma');
M_.param_names = char(M_.param_names, 'eta');
M_.param_names_tex = char(M_.param_names_tex, 'eta');
M_.param_names_long = char(M_.param_names_long, 'eta');
M_.param_names = char(M_.param_names, 'Psi');
M_.param_names_tex = char(M_.param_names_tex, 'Psi');
M_.param_names_long = char(M_.param_names_long, 'Psi');
M_.param_names = char(M_.param_names, 'alpha');
M_.param_names_tex = char(M_.param_names_tex, 'alpha');
M_.param_names_long = char(M_.param_names_long, 'alpha');
M_.param_names = char(M_.param_names, 'a');
M_.param_names_tex = char(M_.param_names_tex, 'a');
M_.param_names_long = char(M_.param_names_long, 'a');
M_.param_names = char(M_.param_names, 'g');
M_.param_names_tex = char(M_.param_names_tex, 'g');
M_.param_names_long = char(M_.param_names_long, 'g');
M_.param_names = char(M_.param_names, 'tauc');
M_.param_names_tex = char(M_.param_names_tex, 'tauc');
M_.param_names_long = char(M_.param_names_long, 'tauc');
M_.param_names = char(M_.param_names, 'taul');
M_.param_names_tex = char(M_.param_names_tex, 'taul');
M_.param_names_long = char(M_.param_names_long, 'taul');
M_.param_names = char(M_.param_names, 'deltah');
M_.param_names_tex = char(M_.param_names_tex, 'deltah');
M_.param_names_long = char(M_.param_names_long, 'deltah');
M_.param_names = char(M_.param_names, 'phi');
M_.param_names_tex = char(M_.param_names_tex, 'phi');
M_.param_names_long = char(M_.param_names_long, 'phi');
M_.param_names = char(M_.param_names, 'x');
M_.param_names_tex = char(M_.param_names_tex, 'x');
M_.param_names_long = char(M_.param_names_long, 'x');
M_.param_partitions = struct();
M_.exo_det_nbr = 0;
M_.exo_nbr = 0;
M_.endo_nbr = 12;
M_.param_nbr = 14;
M_.orig_endo_nbr = 12;
M_.aux_vars = [];
M_.Sigma_e = zeros(0, 0);
M_.Correlation_matrix = eye(0, 0);
M_.H = 0;
M_.Correlation_matrix_ME = 1;
M_.sigma_e_is_diagonal = 1;
M_.det_shocks = [];
options_.block=0;
options_.bytecode=0;
options_.use_dll=0;
M_.hessian_eq_zero = 0;
erase_compiled_function('dsge_humancapital_static');
erase_compiled_function('dsge_humancapital_dynamic');
M_.orig_eq_nbr = 12;
M_.eq_nbr = 12;
M_.ramsey_eq_nbr = 0;
M_.set_auxiliary_variables = exist(['./' M_.fname '_set_auxiliary_variables.m'], 'file') == 2;
M_.max_endo_lag_orig = 1;
M_.max_endo_lead_orig = 1;
M_.max_exo_lag_orig = 0;
M_.max_exo_lead_orig = 0;
M_.max_exo_det_lag_orig = 0;
M_.max_exo_det_lead_orig = 0;
M_.max_lag_orig = 1;
M_.max_lead_orig = 1;
M_.lead_lag_incidence = [
 0 3 0;
 0 4 15;
 0 5 0;
 0 6 0;
 1 7 16;
 0 8 0;
 2 9 0;
 0 10 0;
 0 11 17;
 0 12 0;
 0 13 0;
 0 14 0;]';
M_.nstatic = 8;
M_.nfwrd   = 2;
M_.npred   = 1;
M_.nboth   = 1;
M_.nsfwrd   = 3;
M_.nspred   = 2;
M_.ndynamic   = 4;
M_.equations_tags = {
};
M_.static_and_dynamic_models_differ = 0;
M_.state_var = [5 7 ];
M_.exo_names_orig_ord = [1:0];
M_.maximum_lag = 1;
M_.maximum_lead = 1;
M_.maximum_endo_lag = 1;
M_.maximum_endo_lead = 1;
oo_.steady_state = zeros(12, 1);
M_.maximum_exo_lag = 0;
M_.maximum_exo_lead = 0;
oo_.exo_steady_state = zeros(0, 1);
M_.params = NaN(14, 1);
M_.NNZDerivatives = [40; 44; -1];
M_.params( 1 ) = 0.98;
beta = M_.params( 1 );
M_.params( 2 ) = 0.072;
deltak = M_.params( 2 );
M_.params( 12 ) = 0.06;
deltah = M_.params( 12 );
M_.params( 4 ) = 0.92;
sigma = M_.params( 4 );
M_.params( 5 ) = 0.66;
eta = M_.params( 5 );
M_.params( 6 ) = 1.82;
Psi = M_.params( 6 );
M_.params( 7 ) = 0.32;
alpha = M_.params( 7 );
M_.params( 8 ) = 1.23;
a = M_.params( 8 );
M_.params( 9 ) = 0.2;
g = M_.params( 9 );
M_.params( 3 ) = 0.5;
rho = M_.params( 3 );
M_.params( 10 ) = 0.2;
tauc = M_.params( 10 );
M_.params( 11 ) = 0.1;
taul = M_.params( 11 );
M_.params( 13 ) = 0.3;
phi = M_.params( 13 );
M_.params( 14 ) = 0.1;
x = M_.params( 14 );
%
% INITVAL instructions
%
options_.initval_file = 0;
oo_.steady_state( 1 ) = 0.511295;
oo_.steady_state( 2 ) = 0.26954;
oo_.steady_state( 3 ) = 0.12748;
oo_.steady_state( 4 ) = 0.00600798;
oo_.steady_state( 5 ) = 0.200266;
oo_.steady_state( 10 ) = 1.02041;
oo_.steady_state( 9 ) = 0.0924082;
oo_.steady_state( 6 ) = 0.306103;
oo_.steady_state( 7 ) = 1.77056;
oo_.steady_state( 8 ) = 1.13583;
oo_.steady_state( 11 ) = 0.012016;
oo_.steady_state( 12 ) = 0.00600798;
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
options_.steady.maxit = 1000;
steady;
oo_.dr.eigval = check(M_,options_,oo_);
save('dsge_humancapital_results.mat', 'oo_', 'M_', 'options_');
if exist('estim_params_', 'var') == 1
  save('dsge_humancapital_results.mat', 'estim_params_', '-append');
end
if exist('bayestopt_', 'var') == 1
  save('dsge_humancapital_results.mat', 'bayestopt_', '-append');
end
if exist('dataset_', 'var') == 1
  save('dsge_humancapital_results.mat', 'dataset_', '-append');
end
if exist('estimation_info', 'var') == 1
  save('dsge_humancapital_results.mat', 'estimation_info', '-append');
end
if exist('dataset_info', 'var') == 1
  save('dsge_humancapital_results.mat', 'dataset_info', '-append');
end
if exist('oo_recursive_', 'var') == 1
  save('dsge_humancapital_results.mat', 'oo_recursive_', '-append');
end


disp(['Total computing time : ' dynsec2hms(toc(tic0)) ]);
if ~isempty(lastwarn)
  disp('Note: warning(s) encountered in MATLAB/Octave code')
end
diary off
