AMUSEboot {tsBSS} | R Documentation |
Second-order Separation Sub-White-Noise Bootstrap Testing with AMUSE
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
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 |
k |
The number of latent series that are not white noise. Can be between |
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 |
ncores |
The number of cores to be used. If |
iseed |
If parallel computation is used, the seed passed on to |
... |
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 \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 squares of the corresponding eigenvalues of the autocovariance matrix. Under the null hypothesis the final p - k
eigenvalues equal zero, \lambda_{p-k} = \cdots = \lambda_{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:
Decompose the AMUSE-estimated latent series
\bf S
into the postulated signal{\bf S}_1
and white noise{\bf S}_2
.Take
n
bootstrap samples{\bf S}_2^*
of{\bf S}_2
, see the different strategies below.Recombine
\bf S^* = ({\bf S}_1, {\bf S}_2^*)
and back-transform{\bf X}^*= {\bf S}^* {\bf W}^{-1}
.Compute the test statistic based on
{\bf X}^*
.Repeat the previous steps
n.boot
times.
The four different bootstrapping strategies are:
-
s.boot = "p"
: The first strategy is parametric and simply generates all boostrap samples independently and identically from the standard normal distribution. -
s.boot = "np1"
: The second strategy is non-parametric and pools all observedn(p - k)
white noise observations together and draws the bootstrap samples from amongst them. -
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 thep - k
white noise series it pools the observedn
white noise observations together and draws the bootstrap samples of that particular latent series from amongst them. -
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 resamplingn
vectors of sizep - k
from amongst all the observedn
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
Examples
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)