SpecTest: Global testing for spectral density matrix

View source: R/Tools_SpecTest.R

SpecTestR Documentation

Global testing for spectral density matrix

Description

SpecTest() implements a new global test proposed in Chang et al. (2022) for the following hypothesis testing problem:

H_0:f_{i,j}(\omega)=0 \mathrm{\ for\ any\ }(i,j)\in \mathcal{I}\mathrm{\ and\ } \omega \in \mathcal{J}\mathrm{\ \ versus\ \ }H_1:H_0\mathrm{\ is\ not\ true }\,,

where f_{i,j}(\omega) represents the cross-spectral density between x_{t,i} and x_{t,j} at frequency \omega with x_{t,i} being the i-th component of the p \times 1 times series {\bf x}_t. Here, \mathcal{I} is the set of index pairs of interest, and \mathcal{J} is the set of frequencies.

Usage

SpecTest(X, J.set, cross.indices, B = 1000, flag_c = 0.8)

Arguments

X

An n\times p data matrix {\bf X} = ({\bf x}_1, \dots , {\bf x}_n)', where n is the number of observations of the p\times 1 time series \{{\bf x}_t\}_{t=1}^n.

J.set

A vector representing the set \mathcal{J} of frequencies.

cross.indices

An r \times 2 matrix representing the set \mathcal{I} of r index pairs, where each row represents an index pair.

B

The number of bootstrap replications for generating multivariate normally distributed random vectors when calculating the critical value. The default is 2000.

flag_c

The bandwidth c\in(0,1] of the flat-top kernel for estimating f_{i,j}(\omega) [See (2) in Chang et al. (2022)]. The default is 0.8.

Value

An object of class "hdtstest", which contains the following components:

Stat

The test statistic of the test.

pval

The p-value of the test.

cri95

The critical value of the test at the significance level 0.05.

References

Chang, J., Jiang, Q., McElroy, T. S., & Shao, X. (2022). Statistical inference for high-dimensional spectral density matrix. arXiv preprint. \Sexpr[results=rd]{tools:::Rd_expr_doi("doi:10.48550/arXiv.2212.13686")}.

See Also

SpecMulTest

Examples

# Example 1
## Generate xt
n <- 200
p <- 10
flag_c <- 0.8
B <- 1000
burn <- 1000
z.sim <- matrix(rnorm((n+burn)*p),p,n+burn)
phi.mat <- 0.4*diag(p)
x.sim <- phi.mat %*% z.sim[,(burn+1):(burn+n)]
x <- x.sim - rowMeans(x.sim)

## Generate the sets I and J
cross.indices <- matrix(c(1,2), ncol=2)
J.set <- 2*pi*seq(0,3)/4 - pi

res <- SpecTest(t(x), J.set, cross.indices, B, flag_c)
Stat <- res$statistic
Pvalue <- res$p.value
CriVal <- res$cri95

HDTSA documentation built on April 3, 2025, 11:07 p.m.