This Matlab tutorial demonstrates step by step the single-channel version of a singular spectrum analysis (SSA), a nonparametric spectral estimation method for time series. The guide explains the following steps of an SSA analysis
- creation of the trajectory matrix
- calculation of the covariance matrix
- eigendecomposition of the covariance matrix
- resulting eigenvalues, eigenvectors
- calculation of the principal components
- reconstruction of the time series.
The tutorial also explains the difference between the Toeplitz approach of Vautard and Ghil (1989) and the trajectory approach of Broomhead and King (1986). Note that only the latter approach ensures a positive semi-definite covariance matrix with non-negative eigenvalues. For a review of SSA see Ghil et al. (2002) and Groth and Ghil (2015).
Broomhead, D. S., and G. P. King, 1986: Extracting qualitative dynamics from experimental data, Physica D, Elsevier Science Publishers B. V., 20, 217-236.
Ghil, M., M. R. Allen, M. D. Dettinger, K. Ide, D. Kondrashov, M. E. Mann, A. W. Robertson, A. Saunders, Y. Tian, F. Varadi, and P. Yiou, 2002: Advanced spectral methods for climatic time series, Reviews of Geophysics, 40, 1-41
Groth, A., and M. Ghil, 2015: Monte Carlo Singular Spectrum Analysis (SSA) revisited: Detecting oscillator clusters in multivariate datasets, Journal of Climate, 28, 7873-7893.
Vautard, R., and M. Ghil, 1989: Singular spectrum analysis in nonlinear dynamics, with applications to paleoclimatic time series, Physica D, 35, 395-424.
Thanks very much ! It helps me a lot.
But I have a small suggestion: would you mind change the returned value of the function from 'd' to 'y' ? That`s in the first line of the script.
function [d,r,vr]=ssa(x1,L) -----> function [y,r,vr]=ssa(x1,L)
I think people will care more about the reconstructed time series('y' in the script), rather than the eigenvalue('d' in the script) .
Also this can
this is incredible. thank you
Please kindly tell how to forecast 'n' time steps ahead with SSA where n = 1, 2, 4 ,6, 12, 24, 36?
Thank you very much