kalmanUnivariate function

Univariate filtering (sequential processing) for fast KFS

Univariate filtering (sequential processing) for fast KFS

Univariate treatment (sequential processing) of the multivariate Kalman filter and smoother equations for fast implementation. Refer to Koopman and Durbin (2000).

kalmanUnivariate(X, a0_0, P0_0, A, Lambda, Sig_e, Sig_u)

Arguments

  • X: n x p, numeric matrix of (stationary) time series
  • a0_0: k x 1, initial state mean vector
  • P0_0: k x k, initial state covariance matrix
  • A: k x k, state transition matrix
  • Lambda: p x k, measurement matrix
  • Sig_e: p x p, measurement equation residuals covariance matrix (diagonal)
  • Sig_u: k x k, state equation residuals covariance matrix

Returns

logl log-likelihood of the innovations from the Kalman filter

at_t kxnk x n, filtered state mean vectors

Pt_t kxkxnk x k x n, filtered state covariance matrices

at_n kxnk x n, smoothed state mean vectors

Pt_n kxkxnk x k x n, smoothed state covariance matrices

Pt_tlag_n kxkxnk x k x n, smoothed state covariance with lag

Details

For full details of the univariate filtering approach, please refer to Mosley et al. (2023). Note that nn is the number of observations, pp is the number of time series, and kk is the number of states.

References

Koopman, S. J., & Durbin, J. (2000). Fast filtering and smoothing for multivariate state space models. Journal of Time Series Analysis, 21(3), 281-296.

Mosley, L., Chan, TS., & Gibberd, A. (2023). sparseDFM: An R Package to Estimate Dynamic Factor Models with Sparse Loadings.

  • Maintainer: Alex Gibberd
  • License: GPL (>= 3)
  • Last published: 2023-03-23

Useful links