Allow asymmetric mode check plots, using the new option
mode_check_symmetric_plots (=1 at default, i.e. current behaviour)time-shift
parent
1d14ff8060
commit
7bef23f1b3
|
@ -57,6 +57,7 @@ options_.solve_tolx = eps^(2/3);
|
|||
options_.solve_maxit = 500;
|
||||
|
||||
options_.mode_check_neighbourhood_size = 0.5;
|
||||
options_.mode_check_symmetric_plots = 1;
|
||||
|
||||
% Default number of threads for parallelized mex files.
|
||||
options_.threads.kronecker.A_times_B_kronecker_C = 1;
|
||||
|
|
|
@ -85,6 +85,9 @@ if TeX
|
|||
end
|
||||
|
||||
ll = DynareOptions.mode_check_neighbourhood_size;
|
||||
if isinf(ll),
|
||||
DynareOptions.mode_check_symmetric_plots = 0;
|
||||
end
|
||||
|
||||
for plt = 1:nbplt,
|
||||
if TeX
|
||||
|
@ -108,12 +111,14 @@ for plt = 1:nbplt,
|
|||
xx = x;
|
||||
l1 = max(BayesInfo.lb(kk),(1-ll)*x(kk)); m1 = 0;
|
||||
l2 = min(BayesInfo.ub(kk),(1+ll)*x(kk));
|
||||
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);
|
||||
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)/10):x(kk);
|
||||
z2 = x(kk):((l2-x(kk))/10):l2;
|
||||
|
|
Loading…
Reference in New Issue