Skip to content
Snippets Groups Projects
Commit 9b165d77 authored by Marco Ratto's avatar Marco Ratto Committed by Johannes Pfeifer
Browse files

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

parent 7b94310f
Branches
Tags
1 merge request!2237Improvements to OccBin filtering/smoothing
...@@ -26,6 +26,9 @@ function [regime, regime_start, error_flag]=map_regime(binding_indicator,debug_s ...@@ -26,6 +26,9 @@ function [regime, regime_start, error_flag]=map_regime(binding_indicator,debug_s
% Journal of Monetary Economics 70, 22-38 % Journal of Monetary Economics 70, 22-38
error_flag=0; error_flag=0;
if isempty(binding_indicator)
binding_indicator = false;
end
% analyse violvec and isolate contiguous periods in the other regime. % analyse violvec and isolate contiguous periods in the other regime.
regime(1) = binding_indicator(1); regime(1) = binding_indicator(1);
regime_index = 1; regime_index = 1;
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment