Learn R Programming

HDTSA (version 1.0.4)

SpecTest: Statistical inference for high-dimensional spectral density matrix

Description

SpecTest() implements a new global test proposed in Chang, Jiang, McElroy and Shao (2023) 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\ is\ not\ true.} $$

Usage

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

Value

An object of class "hdtstest" is a list containing the following components:

Stat

Numerical value which represents the value of test statistic.

pval

Numerical value which represents the p-value of the test.

cri95

Numerical value which represents the critical value of the test at the significance level 0.05.

method

A character string indicating what method was performed.

Arguments

X

\({\bf X} = \{{\bf x_1}, \dots , {\bf x}_n \}\), a \(n\times p\) sample matrix, where \(n\) is the sample size and \(p\) is the dimension of \({\bf x}_t\).

J.set

Set \(\mathcal{J}\) for frequencies, a vector, used to calculate the test statistic.

cross.indices

Set \(\mathcal{I}\) for \((i,j)\), a matrix with 2 columns, used to calculate the test statistic.

B

Bootstrap times for generating multivariate normal distributed random vectors in calculating the critical value. Default is B \(=2000\).

flag_c

Bandwidth \(c\) of the flat-top kernel for estimating \(f_{i,j}(\omega)\), where \(c\in(0,1]\). Default is flag_c \(=0.8\).

References

Chang, J., Jiang, Q., McElroy, T. & Shao, X. (2023). Statistical inference for high-dimensional spectral density matrix.

Examples

Run this code
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)
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$Stat
Pvalue <- res$p.value
CriVal <- res$cri95

Run the code above in your browser using DataLab