-
- kalman_algo=1: kstep-ahead variances were WRONG, since Pf was initialized using P in PREVIOUS period - kalman_algo=2: output argument for filtered varainces should be P1, not P (P are UPDATED variances, there). For kalman_algo=2, also make a small factorization fix (compute P(:,:,t+1) before defining Pf, so to compute 1-step ahead variance only once)