If F is identically 0 in Kalman filter, discard parameter draw instead of treating current observation as unobserved
See discussion on mailing list 18/06/2016time-shift
parent
fa3a71bcae
commit
8dc96cafa4
|
@ -172,10 +172,11 @@ while notsteady && t<=last
|
|||
sig=sqrt(diag(F));
|
||||
if any(diag(F)<kalman_tol) || rcond(F./(sig*sig')) < kalman_tol
|
||||
if ~all(abs(F(:))<kalman_tol)
|
||||
%use diffuse filter
|
||||
return
|
||||
else
|
||||
a = T*a;
|
||||
P = T*P*transpose(T)+QQ;
|
||||
%pathological case, discard draw
|
||||
return
|
||||
end
|
||||
else
|
||||
F_singular = 0;
|
||||
|
|
|
@ -81,9 +81,8 @@ while rank(Pinf,diffuse_kalman_tol) && (t<=last)
|
|||
% The univariate diffuse kalman filter should be used.
|
||||
return
|
||||
else %rank 0
|
||||
a = T*a;
|
||||
Pstar = T*Pstar*transpose(T)+QQ;
|
||||
Pinf = T*Pinf*transpose(T); % (5.16) DK (2012)
|
||||
%pathological case, discard draw
|
||||
return
|
||||
end
|
||||
else
|
||||
iFstar = inv(Fstar);
|
||||
|
|
|
@ -152,10 +152,11 @@ while notsteady && t<=last
|
|||
end
|
||||
if rcond(F) < kalman_tol
|
||||
if ~all(abs(F(:))<kalman_tol)
|
||||
% The univariate diffuse kalman filter should be used.
|
||||
return
|
||||
else
|
||||
a = T*a;
|
||||
P = T*P*transpose(T)+QQ;
|
||||
%pathological case, discard draw
|
||||
return
|
||||
end
|
||||
else
|
||||
F_singular = 0;
|
||||
|
|
|
@ -105,10 +105,11 @@ while notsteady && t<=last
|
|||
sig=sqrt(diag(F));
|
||||
if any(diag(F)<kalman_tol) || rcond(F./(sig*sig')) < kalman_tol
|
||||
if ~all(abs(F(:))<kalman_tol)
|
||||
%use diffuse filter
|
||||
return
|
||||
else
|
||||
a = T*a;
|
||||
P = T*P*transpose(T)+QQ;
|
||||
%pathological case, discard draw
|
||||
return
|
||||
end
|
||||
else
|
||||
F_singular = 0;
|
||||
|
|
|
@ -100,9 +100,8 @@ while rank(Pinf,diffuse_kalman_tol) && (t<=last)
|
|||
% The univariate diffuse kalman filter should be used.
|
||||
return
|
||||
else %rank 0
|
||||
a = T*a;
|
||||
Pstar = T*Pstar*transpose(T)+QQ;
|
||||
Pinf = T*Pinf*transpose(T); % (5.16) DK (2012)
|
||||
%pathological case, discard draw
|
||||
return
|
||||
end
|
||||
else
|
||||
iFstar = inv(Fstar);
|
||||
|
|
Loading…
Reference in New Issue