From 1cc29d765b9eb4ba1569e17af12578eb542354b0 Mon Sep 17 00:00:00 2001
From: Johannes Pfeifer <jpfeifer@gmx.de>
Date: Wed, 15 Jul 2020 11:00:48 +0200
Subject: [PATCH] DsgeSmoother: add warning if there is stochastic singularity

---
 matlab/DsgeSmoother.m | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/matlab/DsgeSmoother.m b/matlab/DsgeSmoother.m
index ee1546af50..1496180006 100644
--- a/matlab/DsgeSmoother.m
+++ b/matlab/DsgeSmoother.m
@@ -233,8 +233,10 @@ if kalman_algo == 1 || kalman_algo == 3
                                                       options_.nk,kalman_tol,diffuse_kalman_tol,options_.filter_decomposition,options_.smoothed_state_uncertainty);
     if isinf(alphahat)
         if kalman_algo == 1
+            fprintf('\nDsgeSmoother: Switching to univariate filter. This may be a sign of stochastic singularity.\n')
             kalman_algo = 2;
         elseif kalman_algo == 3
+            fprintf('\nDsgeSmoother: Switching to univariate filter. This may be a sign of stochastic singularity.\n')
             kalman_algo = 4;
         else
             error('This case shouldn''t happen')
-- 
GitLab