SOBIboot {tsBSS}R Documentation

Second-order Separation Sub-White-Noise Bootstrap Testing with SOBI

Description

The function uses SOBI (Second Order Blind Identification) to test whether the last p-k latent series are pure white noise, assuming a p-variate second-order stationary blind source separation (BSS) model. Four different bootstrapping strategies are available and the function can be run in parallel.

Usage

SOBIboot(X, ...)

## Default S3 method:
SOBIboot(X, k, tau = 1:12, n.boot = 200, s.boot = c("p", "np1", "np2", "np3"),
         ncores = NULL, iseed = NULL, eps = 1e-06, maxiter = 200, ...)
## S3 method for class 'ts'
SOBIboot(X, ...)
## S3 method for class 'xts'
SOBIboot(X, ...)
## S3 method for class 'zoo'
SOBIboot(X, ...)

Arguments

X

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

k

The number of latent series that are not white noise. Can be between 0 and p-1.

tau

The vector of lags for the SOBI autocovariance matrices.

n.boot

The number of bootstrapping samples.

s.boot

Bootstrapping strategy to be used. Possible values are "p" (default), "np1", "np2", "np3". See details for further information.

ncores

The number of cores to be used. If NULL or 1, no parallel computing is used. Otherwise makeCluster with type = "PSOCK" is used. It is the users repsonsibilty to choose a reasonable value for ncores. The function detectCores might be useful in this context.

iseed

If parallel computation is used, the seed passed on to clusterSetRNGStream. Default is NULL which means no fixed seed is used.

eps

The convergence tolerance for the joint diagonalization.

maxiter

The maximum number of iterations for the joint diagonalization.

...

Further arguments to be passed to or from methods.

Details

SOBI standardizes X with n samples and jointly diagonalizes the autocovariance matrices of the standardized data for a chosen set of lags tau, yielding a transformation \bf W giving the latent variables as {\bf S} = {\bf X} {\bf W}. Assume, without loss of generality, that the latent components are ordered in decreasing order with respect to the sums of squares of the corresponding "eigenvalues" produced by the joint diagonalization. Under the null hypothesis the final p - k "eigenvalues" of each of the autocovariance matrices equal zero, \lambda^\tau_{p-k} = \cdots = \lambda^\tau_{p} = 0, and their mean square m over all lags can be used as a test statistic in bootstrap-based inference on the true number of latent white noise series.

The function offers four different bootstrapping strategies for generating samples for which the null hypothesis approximately holds, and they are all based on the following general formula:

  1. Decompose the SOBI-estimated latent series \bf S into the postulated signal {\bf S}_1 and white noise {\bf S}_2.

  2. Take n bootstrap samples {\bf S}_2^* of {\bf S}_2, see the different strategies below.

  3. Recombine \bf S^* = ({\bf S}_1, {\bf S}_2^*) and back-transform {\bf X}^*= {\bf S}^* {\bf W}^{-1}.

  4. Compute the test statistic based on {\bf X}^*.

The four different bootstrapping strategies are:

  1. s.boot = "p": The first strategy is parametric and simply generates all boostrap samples independently and identically from the standard normal distribution.

  2. s.boot = "np1": The second strategy is non-parametric and pools all observed n(p - k) white noise observations together and draws the bootstrap samples from amongst them.

  3. s.boot = "np2": The third strategy is non-parametric and proceeds otherwise as the second strategy but acts component-wise. That is, separately for each of the p - k white noise series it pools the observed n white noise observations together and draws the bootstrap samples of that particular latent series from amongst them.

  4. s.boot = "np3": The third strategy is non-parametric and instead of drawing the samples univariately as in the second and third strategies, proceeds by resampling n vectors of size p - k from amongst all the observed n white noise vectors.

The function can be run in parallel by setting ncores to the desired number of cores (should be less than the number of cores available - 1). When running code in parallel the standard random seed of R is overridden and if a random seed needs to be set it should be passed via the argument iseed. The argument iseed has no effect in case ncores equals 1 (the default value).

This function uses for the joint diagonalization the function frjd.int, which does not fail in case of failed convergence but returns the estimate from the final step.

Value

A list of class ictest, inheriting from class htest, containing:

statistic

The value of the test statistic.

p.value

The p-value of the test.

parameter

The number of bootstrap samples.

alternative

Character string specifying the alternative hypothesis.

k

The number of latent series that are not white noise used in the testing problem.

W

The transformation matrix to the latent series.

S

Multivariate time series with the centered source components.

D

The underlying eigenvalues of the autocovariance matrix.

MU

The location of the data which was subtracted before calculating SOBI.

tau

The used set of lags.

method

Character string indicating which test was performed.

data.name

Character string giving the name of the data.

s.boot

Character string denoting which bootstrapping test version was used.

Author(s)

Markus Matilainen, Klaus Nordhausen, Joni Virta

References

Matilainen, M., Nordhausen, K. and Virta, J. (2018), On the Number of Signals in Multivariate Time Series. In Deville, Y., Gannot, S., Mason, R., Plumbley, M.D. and Ward, D. (editors) "International Conference on Latent Variable Analysis and Signal Separation", LNCS 10891, 248–258. Springer, Cham., <doi:10.1007/978-3-319-93764-9_24>.

See Also

AMUSE, AMUSEboot, SOBI, tsboot

Examples

  n <- 1000
  
  A <- matrix(rnorm(16), 4, 4)
  s1 <- arima.sim(list(ar = c(0, 0, 0.3, 0.6)), n)
  s2 <- arima.sim(list(ma = c(0, 0, -0.3, 0.3)), n)
  s3 <- rnorm(n)
  s4 <- rnorm(n)
  
  S <- cbind(s1, s2, s3, s4)
  X <- S %*% t(A)
  
  boot_res_1 <- SOBIboot(X, k = 1)
  boot_res_1
  
  boot_res_2 <- SOBIboot(X, k = 2)
  boot_res_2

  # Plots of the estimated sources, the last two are white noise
  plot(boot_res_2)

  # Note that AMUSEboot with lag 1 does not work due to the lack of short range dependencies
  AMUSEboot(X, k = 1)
  
  # xts series as input
  library("xts")
  data(sample_matrix)
  X2 <- as.xts(sample_matrix)
  boot_res_xts <- SOBIboot(X2, k = 2)
  plot(boot_res_xts, multi.panel = TRUE)

  # zoo series as input
  X3 <- as.zoo(X)
  boot_res_zoo <- SOBIboot(X3, k = 2)
  plot(boot_res_zoo)


[Package tsBSS version 1.0.0 Index]