SSAcor {ssaBSS}R Documentation

Identification of Non-stationarity in the Covariance Structure

Description

SSAcor method for identifying non-stationarity in the covariance structure.

Usage

SSAcor(X, ...)

## Default S3 method:
SSAcor(X, K, n.cuts = NULL, tau = 1, eps = 1e-6, maxiter = 2000, ...)
## S3 method for class 'ts'
SSAcor(X, ...)

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.

Details

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

The values of Y{\bf Y} are then split into KK disjoint intervals TiT_i. For all lags j=1,...,ntauj=1, ..., ntau, algorithm first calculates matrices

Mj=i=1KTiT(Sj,TSj,Ti)(Sj,TSj,Ti)T,{\bf M_j} = \sum_{i = 1}^K \frac{T_i}{T}({\bf S}_{j,T} - {\bf S}_{j,T_i})({\bf S}_{j,T} - {\bf S}_{j,T_i})^T,

where i=1,,Ki = 1, \ldots, K, KK is the number of breakpoints, SJ,T{\bf S}_{J,T} is the global sample covariance for lag jj, and Sτ,Ti{\bf S}_{\tau,T_i} is the sample covariance of values of Y{\bf Y} which belong to a disjoint interval TiT_i.

The algorithm finds an orthogonal matrix U{\bf U} by maximizing

j=1ntaudiag(UMjU)2.\sum_{j = 1}^{ntau} ||\textrm{diag}({\bf}{\bf U}{\bf M}_j {\bf U}')||^2.

where j=1,,ntauj = 1, \ldots, ntau.

The final unmixing matrix is then W=US1/2{\bf W} = {\bf U S}^{-1/2}. Then the pseudo eigenvalues Di=diag(UMiU)=diag(di,1,,di,p){\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 di,jd_{i,j} tells if the jjth component is nonstationary with respect to Mi{\bf M}_i. The first kk rows of W{\bf W} project the observed time series to the subspace of components with non-stationary covariance, and the last pkp-k rows to the subspace of components with stationary covariance.

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.

M

Used separation matrix.

K

Number of intervals the time series is split into.

D

The sums of pseudo eigenvalues.

DTable

The peudo eigenvalues of size ntau*p 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 ("SSAcor"), to be used in e.g. screeplot.

Author(s)

Markus Matilainen, Klaus Nordhausen

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

Examples


n <- 5000
A <- rorth(4)

z1 <- rtvAR1(n)
z2a <- arima.sim(floor(n/3), model = list(ar = c(0.5),
        innov = c(rnorm(floor(n/3), 0, 1))))
z2b <- arima.sim(floor(n/3), model = list(ar = c(0.2),
        innov = c(rnorm(floor(n/3), 0, 1.28))))
z2c <- arima.sim(n - 2*floor(n/3), model = list(ar = c(0.8),
        innov = c(rnorm(n - 2*floor(n/3), 0, 0.48))))
z2 <- c(z2a, z2b, z2c)
z3 <- arima.sim(n, model = list(ma = c(0.72, 0.24), ar = c(0.14, 0.45)))
z4 <- arima.sim(n, model = list(ar = c(0.34, 0.27, 0.18))) 

Z <- cbind(z1, z2, z3, z4)
library(zoo)
X <- as.zoo(tcrossprod(Z, A)) # A zoo object

res <- SSAcor(X, K = 6, tau = 1)
ggscreeplot(res, type = "barplot", color = "gray") # Two non-zero eigenvalues

# Plotting the components as a zoo object
plot(res) # The first two are nonstationary in autocovariance


[Package ssaBSS version 0.1.1 Index]