Check positive steady state for loglinear option...
1e-9 is too far from zero. Set 1e-16 as a threshold value for the positivity test.time-shift
parent
8925e7ca1f
commit
ffebf6b262
|
@ -109,9 +109,11 @@ if info(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
if options.loglinear
|
if options.loglinear
|
||||||
|
threshold = 1e-16;
|
||||||
% Find variables with non positive steady state. Skip auxiliary
|
% Find variables with non positive steady state. Skip auxiliary
|
||||||
% variables for lagges/leaded exogenous variables
|
% variables for lagges/leaded exogenous variables
|
||||||
idx = find(dr.ys(get_all_variables_but_lagged_leaded_exogenous(M)) < 1e-9);
|
idx = find(dr.ys(get_all_variables_but_lagged_leaded_exogenous(M))<threshold);
|
||||||
|
idx
|
||||||
if length(idx)
|
if length(idx)
|
||||||
if options.debug
|
if options.debug
|
||||||
variables_with_non_positive_steady_state = M.endo_names(idx,:);
|
variables_with_non_positive_steady_state = M.endo_names(idx,:);
|
||||||
|
@ -132,7 +134,7 @@ if options.loglinear
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
info(1)=26;
|
info(1)=26;
|
||||||
info(2)=sum(dr.ys(dr.ys<1e-9).^2);
|
info(2)=sum(dr.ys(dr.ys<threshold).^2);
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue