Added the possibility to set the number of points in mode_check for computing the transversal cuts.
parent
8820c63f5e
commit
06237375db
|
@ -11,7 +11,7 @@ function global_initialization()
|
|||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
|
||||
% Copyright (C) 2003-2013 Dynare Team
|
||||
% Copyright (C) 2003-2012 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -51,16 +51,16 @@ options_.initval_file = 0;
|
|||
options_.Schur_vec_tol = 1e-11; % used to find nonstationary variables in Schur decomposition of the
|
||||
% transition matrix
|
||||
options_.qz_criterium = [];
|
||||
options_.qz_zero_threshold = 1e-6;
|
||||
options_.lyapunov_complex_threshold = 1e-15;
|
||||
options_.solve_tolf = eps^(1/3);
|
||||
options_.solve_tolx = eps^(2/3);
|
||||
options_.solve_maxit = 500;
|
||||
|
||||
options_.mode_check_neighbourhood_size = 0.5;
|
||||
options_.mode_check_symmetric_plots = 1;
|
||||
options_.mode_check_neighbourhood_size = 0.01;
|
||||
options_.mode_check_node_number = 1000;
|
||||
|
||||
% Default number of threads for parallelized mex files.
|
||||
|
||||
% Default number of thread. for parallelized mex files.
|
||||
options_.threads.kronecker.A_times_B_kronecker_C = 1;
|
||||
options_.threads.kronecker.sparse_hessian_times_B_kronecker_C = 1;
|
||||
options_.threads.local_state_space_iteration_2 = 1;
|
||||
|
@ -237,6 +237,9 @@ particle.resampling.number_of_partitions = 200;
|
|||
particle.mixture_state_variables = 5 ;
|
||||
particle.mixture_structural_shocks = 1 ;
|
||||
particle.mixture_measurement_shocks = 1 ;
|
||||
% Online approach
|
||||
particle.liu_west_delta = 0.99 ;
|
||||
particle.liu_west_chol_sigma_bar = .01 ;
|
||||
% Copy ep structure in options_ global structure
|
||||
options_.particle = particle;
|
||||
|
||||
|
@ -558,7 +561,6 @@ options_.risky_steadystate = 0;
|
|||
|
||||
% endogenous prior
|
||||
options_.endogenous_prior = 0;
|
||||
options_.endogenous_prior_restrictions.irf={};
|
||||
|
||||
% use GPU
|
||||
options_.gpu = 0;
|
||||
|
|
|
@ -40,7 +40,7 @@ function mode_check(fun,x,hessian,DynareDataset,DynareOptions,Model,EstimatedPar
|
|||
%! @end deftypefn
|
||||
%@eod:
|
||||
|
||||
% Copyright (C) 2003-2013 Dynare Team
|
||||
% Copyright (C) 2003-2012 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -85,9 +85,7 @@ if TeX
|
|||
end
|
||||
|
||||
ll = DynareOptions.mode_check_neighbourhood_size;
|
||||
if isinf(ll),
|
||||
DynareOptions.mode_check_symmetric_plots = 0;
|
||||
end
|
||||
half_number_nodes = .5*DynareOptions.mode_check_node_number ;
|
||||
|
||||
for plt = 1:nbplt,
|
||||
if TeX
|
||||
|
@ -109,19 +107,18 @@ for plt = 1:nbplt,
|
|||
end
|
||||
end
|
||||
xx = x;
|
||||
l1 = max(BayesInfo.lb(kk),(1-sign(x(kk))*ll)*x(kk)); m1 = 0;
|
||||
l2 = min(BayesInfo.ub(kk),(1+sign(x(kk))*ll)*x(kk));
|
||||
if DynareOptions.mode_check_symmetric_plots,
|
||||
if l2<(1+ll)*x(kk)
|
||||
l1 = x(kk) - (l2-x(kk));
|
||||
m1 = 1;
|
||||
end
|
||||
if ~m1 && (l1>(1-ll)*x(kk)) && (x(kk)+(x(kk)-l1)<BayesInfo.ub(kk))
|
||||
l2 = x(kk) + (x(kk)-l1);
|
||||
end
|
||||
l1 = max(BayesInfo.lb(kk),(1-ll)*x(kk));
|
||||
l2 = min(BayesInfo.ub(kk),(1+ll)*x(kk));
|
||||
m1 = 0;
|
||||
if l2<(1+ll)*x(kk)
|
||||
l1 = x(kk) - (l2-x(kk));
|
||||
m1 = 1;
|
||||
end
|
||||
z1 = l1:((x(kk)-l1)/10):x(kk);
|
||||
z2 = x(kk):((l2-x(kk))/10):l2;
|
||||
if ~m1 && (l1>(1-ll)*x(kk)) && (x(kk)+(x(kk)-l1)<BayesInfo.ub(kk))
|
||||
l2 = x(kk) + (x(kk)-l1);
|
||||
end
|
||||
z1 = l1:((x(kk)-l1)/half_number_nodes):x(kk);
|
||||
z2 = x(kk):((l2-x(kk))/half_number_nodes):l2;
|
||||
z = union(z1,z2);
|
||||
if DynareOptions.mode_check_nolik==0,
|
||||
y = zeros(length(z),2);
|
||||
|
|
Loading…
Reference in New Issue