Multivariate Innovations
Function mvInnovations
computes the multivariate versions of one
step-ahead prediction errors and their variances using the output of KFS
.
mvInnovations(x)
x |
Object of class |
v |
Multivariate prediction errors v[t,i] = y[t] - Z[t]a[t] |
F |
Prediction error variances Var(v[t]). |
Finf |
Diffuse part of F[t]. |
# Compute the filtered estimates based on the KFS output filtered <- function(x) { innov <- mvInnovations(x) att <- window(x$a, end = end(x$a) - 1) tvz <- attr(x$model,"tv")[1] for (i in 1:nrow(att)) { att[i,] <- att[i,] + x$P[,,i] %*% t(solve(innov$F[,,i], x$model$Z[, , tvz * (i - 1) + 1, drop = FALSE])) %*% innov$v[i, ] } att }
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.