Learn R Programming

ssaBSS (version 0.1.1)

SSAcomb: Combination Main SSA Methods

Description

SSAcomb method for identification for non-stationarity in mean, variance and covariance structure.

Usage

SSAcomb(X, ...)

# S3 method for default SSAcomb(X, K, n.cuts = NULL, tau = 1, eps = 1e-6, maxiter = 2000, ...) # S3 method for ts SSAcomb(X, ...)

Value

A list of class 'ssabss', inheriting from class 'bss', containing the following components:

W

The estimated unmixing matrix.

S

The estimated sources as time series object standardized to have mean 0 and unit variances.

R

Used M-matrices as an array.

K

Number of intervals the time series is split into.

D

The sums of pseudo eigenvalues.

DTable

The peudo eigenvalues of size ntau + 2 to see which type of nonstationarity there exists in each component.

MU

The mean vector of X.

n.cut

Used K+1 vector of values that correspond to the breaks which are used for splitting the data.

k

The used lag.

method

Name of the method ("SSAcomb"), to be used in e.g. screeplot.

Arguments

X

A numeric matrix or a multivariate time series object of class ts, xts or zoo. Missing values are not allowed.

K

Number of intervals the time series is split into.

n.cuts

A K+1 vector of values that correspond to the breaks which are used for splitting the data. Default is intervals of equal length.

tau

The lag as a scalar or a vector. Default is 1.

eps

Convergence tolerance.

maxiter

The maximum number of iterations.

...

Further arguments to be passed to or from methods.

Author

Markus Matilainen, Klaus Nordhausen

Details

Assume that a \(p\)-variate \({\bf Y}\) with \(T\) observations is whitened, i.e. \({\bf Y}={\bf S}^{-1/2}({\bf X}_t - \frac{1}{T}\sum_{t=1}^T {\bf X}_{t})\), for \(t = 1, \ldots, T,\) where \({\bf S}\) is the sample covariance matrix of \({\bf X}\).

The values of \({\bf Y}\) are then split into \(K\) disjoint intervals \(T_i\). For all lags \(j = 1, ..., ntau\), algorithm first calculates the \({\bf M}\) matrices from SSAsir (matrix \({\bf M}_1\)), SSAsave (matrix \({\bf M}_2\)) and SSAcor (matrices \({\bf M}_{j+2}\)).

The algorithm finds an orthogonal matrix \({\bf U}\) by maximizing $$\sum_{i = 1}^{ntau+2} ||\textrm{diag}({\bf}{\bf U}{\bf M}_i {\bf U}')||^2.$$ where \(i = 1, \ldots, ntau + 2\). The final unmixing matrix is then \({\bf W} = {\bf US}^{-1/2}\).

Then the pseudo eigenvalues \({\bf D}_i = \textrm{diag}({\bf}{\bf U}{\bf M}_i {\bf U}') = \textrm{diag}(d_{i,1}, \ldots, d_{i,p})\) are obtained and the value of \(d_{i,j}\) tells if the \(j\)th component is nonstationary with respect to \({\bf M}_i\).

References

Flumian L., Matilainen M., Nordhausen K. and Taskinen S. (2021) Stationary subspace analysis based on second-order statistics. Submitted. Available on arXiv: https://arxiv.org/abs/2103.06148

See Also

JADE frjd

Examples

Run this code

n <- 10000
A <- rorth(6)

z1 <- arima.sim(n, model = list(ar = 0.7)) + rep(c(-1.52, 1.38), 
        c(floor(n*0.5), n - floor(n*0.5)))
z2 <- rtvAR1(n)
z3 <- rtvvar(n, alpha = 0.2, beta = 0.5)
z4 <- arima.sim(n, model = list(ma = c(0.72, 0.24), ar = c(0.14, 0.45)))
z5 <- arima.sim(n, model = list(ma = c(0.34))) 
z6 <- arima.sim(n, model = list(ma = c(0.72, 0.15)))

Z <- cbind(z1, z2, z3, z4, z5, z6)
library(xts)
X <- tcrossprod(Z, A)
X <- xts(X, order.by = as.Date(1:n)) # An xts object

res <- SSAcomb(X, K = 12, tau = 1)
ggscreeplot(res, type = "lines") # Three non-zero eigenvalues
res$DTable # Components have different kind of nonstationarities

# Plotting the components as an xts object
plot(res, multi.panel = TRUE) # The first three are nonstationary


Run the code above in your browser using DataLab