AMUSEboot: Second-order Separation Sub-White-Noise Bootstrap Testing...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/AMUSEboot.R

Description

The function uses AMUSE (Algorithm for Multiple Unknown Signals Extraction) 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
AMUSEboot(X, ...)

## Default S3 method:
AMUSEboot(X, k, tau = 1, n.boot = 200, s.boot = c("p", "np1", "np2", "np3"),
          ncores = NULL, iseed = NULL, ...)
## S3 method for class 'ts'
AMUSEboot(X, ...)
## S3 method for class 'xts'
AMUSEboot(X, ...)
## S3 method for class 'zoo'
AMUSEboot(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 lag for the AMUSE autocovariance matrix.

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.

...

Further arguments to be passed to or from methods.

Details

AMUSE standardizes X with n samples and computes the eigendecomposition of the autocovariance matrix of the standardized data for a chosen lag tau, yielding a transformation W giving the latent variables as S = XW. Assume, without loss of generality, that the latent components are ordered in decreasing order with respect to the squares of the corresponding eigenvalues of the autocovariance matrix. Under the null hypothesis the final p - k eigenvalues equal zero, λ_(p-k) = … = λ_p = 0, and their mean square m 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 AMUSE-estimated latent series S into the postulated signal S_1 and white noise S_2.

  2. Take n bootstrap samples S_2^* of S_2, see the different strategies below.

  3. Recombine S^*=(S_1, S_2^*) and back-transform X^*= S^* W^(-1).

  4. Compute the test statistic based on X^*.

  5. Repeat the previous steps n.boot times.

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, 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, it 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).

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 AMUSE.

tau

The used lag.

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, SOBI, SOBIboot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
  n <- 1000

  A <- matrix(rnorm(16), 4, 4)
  s1 <- arima.sim(list(ar = c(0.3, 0.6)), n)
  s2 <- arima.sim(list(ma = c(-0.3, 0.3)), n)
  s3 <- rnorm(n)
  s4 <- rnorm(n)

  S <- cbind(s1, s2, s3, s4)
  X <- S %*% t(A)

  boot_res_1 <- AMUSEboot(X, k = 1)
  boot_res_1

  boot_res_2 <- AMUSEboot(X, k = 2)
  boot_res_2

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

tsBSS documentation built on July 10, 2021, 9:07 a.m.