kalmanMultivariate {sparseDFM}R Documentation

Classic Multivariate KFS Equations

Description

Implementation of the classic multivariate Kalman filter and smoother equations of Shumway and Stoffer (1982).

Usage

kalmanMultivariate(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

Details

For full details of the classic multivariate KFS 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.

Value

logl log-likelihood of the innovations from the Kalman filter

at_t k×nk \times n, filtered state mean vectors

Pt_t k×k×nk \times k \times n, filtered state covariance matrices

at_n k×nk \times n, smoothed state mean vectors

Pt_n k×k×nk \times k \times n, smoothed state covariance matrices

Pt_tlag_n k×k×nk \times k \times n, smoothed state covariance with lag

References

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

Shumway, R. H., & Stoffer, D. S. (1982). An approach to time series smoothing and forecasting using the EM algorithm. Journal of time series analysis, 3(4), 253-264.


[Package sparseDFM version 1.0 Index]