tssdr {tsBSS}R Documentation

Supervised Dimension Reduction for Multivariate Time Series

Description

Supervised dimension reduction for multivariate time series data. There are three different algorithms to choose from. TSIR is a time series version of Sliced Inverse Regression (SIR), TSAVE is a time series version of Sliced Average Variance Estimate (TSAVE) and a hybrid of TSIR and TSAVE is TSSH (Time series SIR SAVE Hybrid). For summary of an object of class tssdr, see summary.tssdr.

Usage

tssdr(y, X, ...)

## Default S3 method:
tssdr(y, X, algorithm = c("TSIR", "TSAVE", "TSSH"), k = 1:12, H = 10, weight = 0.5,
      method = c("frjd", "rjd"), eps = 1e-06, maxiter = 1000, ...)
## S3 method for class 'ts'
tssdr(y, X, ...)
## S3 method for class 'xts'
tssdr(y, X, ...)
## S3 method for class 'zoo'
tssdr(y, X, ...)

## S3 method for class 'tssdr'
print(x, digits = 3, ...)
## S3 method for class 'tssdr'
components(x, ...)
## S3 method for class 'tssdr'
plot(x, main = "The response and the directions", ...)

Arguments

y

A numeric vector or a time series object of class ts, xts or zoo (same type as X). Missing values are not allowed.

X

A numeric matrix or a multivariate time series object of class ts, xts or zoo (same type as y). Missing values are not allowed.

algorithm

Algorithm to be used. The options are "TSIR", "TSAVE" and "TSSH". Default is "TSIR".

k

A vector of lags. It can be any non-zero positive integer, or a vector consisting of them. Default is 1:12.

H

The number of slices. If "TSSH" is used, HH is a 2-vector; the first element is used for TSIR part and the second for TSAVE part. Default is H=10H = 10.

weight

Weight 0a10 \le a \le 1 for the hybrid method TSSH only. With a=1a = 1 it reduces to TSAVE and with a=0a = 0 to TSIR. Default is a=0.5a = 0.5.

method

The method to use for the joint diagonalization. The options are "rjd" and "frjd". Default is "frjd".

eps

Convergence tolerance.

maxiter

The maximum number of iterations.

...

Further arguments to be passed to or from methods.

In methods for class 'tssdr' only:

x

An object of class tssdr

digits

The number of digits when printing an object of class tssdr. Default is 3

main

A title for a plot when printing an object of class tssdr.

Details

Assume that the pp-variate time series Z{\bf Z} with TT observations is whitened, i.e. Z=S1/2(Xt1Tt=1TXt){\bf Z}={\bf S}^{-1/2}({\bf X}_t - \frac{1}{T}\sum_{t=1}^T {\bf X}_{t}), for t=1,,Tt = 1, \ldots, T, where S{\bf S} is a sample covariance matrix of X{\bf X}. Divide yy into HH disjoint intervals (slices) by its empirical quantiles.

For each lag jj, denote yjy_{j} for a vector of the last njn - j values of the sliced yy. Also denote Zj{\bf Z}_j for the first njn - j observations of Z{\bf Z}. Then Zjh{\bf Z}_{jh} are the disjoint slices of Zj{\bf Z}_j according to the values of yjy_{j}.

Let TjhT_{jh} be the number of observations in Zjh{\bf Z}_{jh}. Write A^jh=1Tjht=1Tjh(Zjh)t\bf \widehat{A}_{jh} = \frac{1}{T_{jh}}\sum_{t = 1}^{T_{jh}}({\bf Z}_{jh})_{t} for t=1,,Tjht = 1, \ldots, T_jh, and A^j=(A^j1,,A^jH){\bf \widehat A}_j = ({\bf \widehat{A}}_{j1}, \ldots, {\bf \widehat{A}}_{jH})'. Then for algorithm TSIR matrix

M^0j=Cov^Aj.{\bf \widehat{M}}_{0j} = {\bf \widehat{Cov}}_{A_j}.

Denote Cov^jh\bf \widehat{Cov}_{jh} for a sample covariance matrix of Zjh{\bf Z}_{jh}. Then for algorithm TSAVE matrix

M^0j=1Hh=1H(IpCov^jh)2.{\bf \widehat{M}}_{0j} = \frac{1}{H}\sum_{h = 1}^H({\bf I}_p - {\bf \widehat{Cov}_{jh}})^2.

h=1,,Hh = 1, \ldots, H.

For TSSH then matrix

M^2j=aM^1j+(1a)M^0j,{\bf \widehat{M}}_{2j} = a{\bf \widehat{M}_{1j}} + (1-a){\bf \widehat{M}_{0j}},

for a chosen 0a10 \le a \le 1. Note that the value of HH can be different for TSIR and TSAVE parts.

The algorithms find an orthogonal matrix U=(u1,,up){\bf U} = (\bf u_1, \ldots, \bf u_p)' by maximizing, for b=0,1b = 0, 1 or 22,

ikdiag(UM^bjU)2=i1pjk(uiM^bjui)2.\sum_{i \in k} ||diag({\bf U} {\bf \widehat{M}}_{bj} {\bf U}')||^2 = \sum_{i \in 1}^p \sum_{j \in k} ({\bf u}_i' {\bf \widehat{M}}_{bj} {\bf u}_i)^2.

for i=1,,pi = 1, \ldots, p and all lags jj. The final signal separation matrix is then W=US1/2{\bf W} = {\bf US}^{-1/2}.

Write λij=c(uiM^bjui)2\lambda_{ij} = c({\bf u}_i' {\bf \widehat{M}}_{bj} {\bf u}_i)^2, where cc is chosen in such way that i=1pjkλij=1.\sum_{i = 1}^p \sum_{j \in k} \lambda_{ij}= 1. for i=1,,pi = 1, \ldots, p and all lags jj. Then the (i,j)(i, j):th element of the matrix L\bf L is λij\lambda_{ij}.

To make a choice on which lags and directions to keep, see summary.tssdr. Note that when printing a tssdr object, all elements are printed, except the directions S.

Value

A list of class 'tssdr' containing the following components:

W

The estimated signal separation matrix.

k

The vector of the used lags.

S

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

MU

The mean vector of X.

L

The Lambda matrix for choosing lags and directions.

H

The used number of slices.

yname

The name for the response time series yy.

Xname

The name for the predictor time series X\bf X.

algorithm

The used algorithm as a character string.

Author(s)

Markus Matilainen

References

Matilainen, M., Croux, C., Nordhausen, K. and Oja, H. (2017), Supervised Dimension Reduction for Multivariate Time Series, Econometrics and Statistics, 4, 57–69.

Matilainen, M., Croux, C., Nordhausen, K. and Oja, H. (2019), Sliced Average Variance Estimation for Multivariate Time Series. Statistics: A Journal of Theoretical and Applied Statistics, 53, 630–655.

Li, K.C. (1991), Sliced Inverse Regression for Dimension Reduction, Journal of the American Statistical Association, 86, 316–327.

Cook, R. and Weisberg, S. (1991), Sliced Inverse Regression for Dimension Reduction, Comment. Journal of the American Statistical Association, 86, 328–332.

See Also

summary.tssdr, dr

Examples

n <- 10000
A <- matrix(rnorm(9), 3, 3)

x1 <- arima.sim(n = n, list(ar = 0.2))
x2 <- arima.sim(n = n, list(ar = 0.8))
x3 <- arima.sim(n = n, list(ar = 0.3, ma = -0.4))
eps2 <- rnorm(n - 1)
y <- 2*x1[1:(n - 1)] + eps2
X <- ((cbind(x1, x2, x3))[2:n, ]) %*% t(A)

res1 <- tssdr(y, X, algorithm = "TSAVE")
res1
summ1 <- summary(res1, type = "alllag", thres = 0.8)
summ1
plot(summ1)
head(components(summ1))
coef(summ1)

# Hybrid of TSIR and TSAVE. For TSIR part H = 10 and for TSAVE part H = 2.
tssdr(y, X, algorithm = "TSSH", weight = 0.6, H = c(10, 2))

[Package tsBSS version 1.0.0 Index]