fxing bug in diffuse smoother with missing values

time-shift
Michel Juillard 2016-03-06 21:07:50 +01:00
parent 08375e7ba6
commit 42ecfa382f
1 changed files with 2 additions and 2 deletions

View File

@ -116,7 +116,7 @@ while rank(Pinf(:,:,t+1),diffuse_kalman_tol) && t<smpl
alphahat = Inf;
return
else
a(:,:,t+1) = T*a(:,:,t);
a(:,t+1) = T*a(:,t);
Pstar(:,:,t+1) = T*Pstar(:,:,t)*transpose(T)+QQ;
Pinf(:,:,t+1) = T*Pinf(:,:,t)*transpose(T);
end
@ -125,7 +125,7 @@ while rank(Pinf(:,:,t+1),diffuse_kalman_tol) && t<smpl
Kstar(:,:,t) = Pstar(:,:,t)*ZZ'*iFstar(:,:,t);
Pinf(:,:,t+1) = T*Pinf(:,:,t)*transpose(T);
Pstar(:,:,t+1) = T*(Pstar(:,:,t)-Pstar(:,:,t)*ZZ'*Kstar(:,:,t)')*T'+QQ;
a(:,:,t+1) = T*(a(:,:,t)+Kstar(:,:,t)*v(:,t));
a(:,t+1) = T*(a(:,t)+Kstar(:,:,t)*v(:,t));
end
end
else