SpecMulTest: Statistical inference for high-dimensional spectral density...

View source: R/Tools_SpecTest.R

SpecMulTestR Documentation

Statistical inference for high-dimensional spectral density matrix

Description

SpecMulTest() implements a new multiple test proposed in Chang, Jiang, McElroy and Shao (2023) for the Q hypothesis testing problems:

H_{0,q}:f_{i,j}(\omega)=0\mathrm{\ for\ any\ }(i,j)\in\mathcal{I}^{(q)}\mathrm{\ and\ } \omega\in\mathcal{J}^{(q)}\mathrm{\ \ versus\ \ } H_{1,q}:H_{0,q}\mathrm{\ is\ not\ true.}

for q\in\{1,\dots,Q\}.

Usage

SpecMulTest(Q, PVal, alpha = 0.05, seq_len = 0.01)

Arguments

Q

Number of the hypothesis tests.

PVal

P-values for the Q hypothesis tests, a Q vector.

alpha

The prescribed significance level. Default is 0.05.

seq_len

Length used to take discrete points between 0 and \sqrt(2\times\log(Q)-2\times\log(\log(Q)). Default is 0.01.

Value

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

MultiTest

Logical vector with length Q. If the element is TRUE, it means rejecting the corresponding sub-null hypothesis, otherwise it means not rejecting the corresponding sub-null hypothesis.

References

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

Examples

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)
Q <- 4
ISET <- list()
ISET[[1]] <- matrix(c(1,2),ncol=2)
ISET[[2]] <- matrix(c(1,3),ncol=2)
ISET[[3]] <- matrix(c(1,4),ncol=2)
ISET[[4]] <- matrix(c(1,5),ncol=2)
JSET <- as.list(2*pi*seq(0,3)/4 - pi)
PVal <- rep(NA,Q)
for (q in 1:Q) {
  cross.indices <- ISET[[q]]
  J.set <- JSET[[q]]
  temp.q <- SpecTest(t(x), J.set, cross.indices, B, flag_c)
  PVal[q] <- temp.q$p.value
}  # Q
res <- SpecMulTest(Q, PVal)
res


HDTSA documentation built on Sept. 11, 2024, 5:49 p.m.

Related to SpecMulTest in HDTSA...