Commit 39ef86f1 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Partially reverted commit 06237375.

parent 25fd2917
......@@ -11,7 +11,7 @@ function global_initialization()
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2003-2012 Dynare Team
% Copyright (C) 2003-2013 Dynare Team
%
% This file is part of Dynare.
%
......@@ -51,16 +51,17 @@ 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.01;
options_.mode_check_neighbourhood_size = .5;
options_.mode_check_symmetric_plots = 1;
options_.mode_check_node_number = 1000;
% Default number of thread. for parallelized mex files.
% Default number of threads 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;
......@@ -561,6 +562,7 @@ 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-2012 Dynare Team
% Copyright (C) 2003-2013 Dynare Team
%
% This file is part of Dynare.
%
......@@ -85,6 +85,9 @@ 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,
......@@ -107,18 +110,19 @@ for plt = 1:nbplt,
end
end
xx = x;
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
if ~m1 && (l1>(1-ll)*x(kk)) && (x(kk)+(x(kk)-l1)<BayesInfo.ub(kk))
l2 = x(kk) + (x(kk)-l1);
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
end
z1 = l1:((x(kk)-l1)/half_number_nodes):x(kk);
z2 = x(kk):((l2-x(kk))/half_number_nodes):l2;
z1 = l1:((x(kk)-l1)/10):x(kk);
z2 = x(kk):((l2-x(kk))/10):l2;
z = union(z1,z2);
if DynareOptions.mode_check_nolik==0,
y = zeros(length(z),2);
......
Markdown is supported
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