Skip to content
Snippets Groups Projects
Commit 2c7bf9d0 authored by Marco Ratto's avatar Marco Ratto Committed by Stéphane Adjemian
Browse files

As we do for the smoother, check the rank of Pinf only for the observables (i.e. using Z*Pinf*Z')

(cherry picked from commit b9741548)
parent f441b9d7
Branches
Tags
No related merge requests found
......@@ -65,7 +65,7 @@ dLIK = Inf; % Default value of the log likelihood.
oldK = Inf;
s = 0;
while rank(Pinf,diffuse_kalman_tol) && (t<=last)
while rank(Z*Pinf*Z',diffuse_kalman_tol) && (t<=last)
s = t-start+1;
v = Y(:,t)-Z*a; %get prediction error v^(0) in (5.13) DK (2012)
Finf = Z*Pinf*Z'; % (5.7) in DK (2012)
......
......@@ -154,7 +154,7 @@ while newRank && (t<=last)
end
end
if newRank
oldRank = rank(Pinf,diffuse_kalman_tol);
oldRank = rank(Z*Pinf*Z',diffuse_kalman_tol);
else
oldRank = 0;
end
......@@ -162,7 +162,7 @@ while newRank && (t<=last)
Pstar = T*Pstar*T'+QQ;
Pinf = T*Pinf*T';
if newRank
newRank = rank(Pinf,diffuse_kalman_tol);
newRank = rank(Z*Pinf*Z',diffuse_kalman_tol);
end
if oldRank ~= newRank
disp('univariate_diffuse_kalman_filter:: T does influence the rank of Pinf!')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment