occbin.map_regime.m: trap case where indicator is empty

covariance-quadratic-approximation
Marco Ratto 2023-12-16 12:07:54 +01:00 committed by Johannes Pfeifer
parent 7b94310fd4
commit 9b165d7785
1 changed files with 3 additions and 0 deletions

View File

@ -26,6 +26,9 @@ function [regime, regime_start, error_flag]=map_regime(binding_indicator,debug_s
% Journal of Monetary Economics 70, 22-38
error_flag=0;
if isempty(binding_indicator)
binding_indicator = false;
end
% analyse violvec and isolate contiguous periods in the other regime.
regime(1) = binding_indicator(1);
regime_index = 1;