Learn R Programming

Rssa (version 0.8.2)

Rssa-package: A collection of methods for singular spectrum analysis

Description

Singular Spectrum Analysis (SSA, in short) is a modern non-parametric method for the timeseries analysis. This package provides a set of fast and reliable implementations of various routines to perform the decomposition and reconstruction of the timeseries.

Arguments

Details

Typically the use of the package starts with the decomposition of the time series using new.ssa. After this a suitable grouping of the elementary time series is required. This can be done heuristically, for example, via looking at the eigenplots of the decomposition (plot). Alternatively, one can examine the so-called w-correlation matrix (wcor). Next step includes the reconstruction of the time-series using the selected grouping (reconstruct).

References

Golyandina, N., Nekrutkin, V. and Zhigljavsky, A. (2001): Analysis of Time Series Structure: SSA and related techniques. Chapman and Hall/CRC. ISBN 1584881941 Korobeynikov, A. (2010) Computation- and space-efficient implementation of SSA. Statistics and Its Interface, Vol. 3, No. 3, Pp. 257-268

See Also

new.ssa, decompose, reconstruct, wcor, plot

Examples

Run this code
s <- new.ssa(co2) # Perform the decomposition using the default window length
summary(s)        # Show various information about the decomposition
plot(s)           # Show the plot of the eigenvalues
f <- reconstruct(s, groups = list(1, c(2, 3), 4)) # Reconstruct into 3 series
plot(co2)         # Plot the original series
lines(f$F1, col = "blue")            # Extract the trend
lines(f$F1+f$F2, col = "red")        # Add the periodicity
lines(f$F1+f$F2+f$F3, col = "green") # Add slow-varying component

Run the code above in your browser using DataLab