View source: R/Tools_SpecTest.R
SpecMulTest | R Documentation |
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\}
.
SpecMulTest(Q, PVal, alpha = 0.05, seq_len = 0.01)
Q |
Number of the hypothesis tests. |
PVal |
P-values for the |
alpha |
The prescribed significance level. Default is 0.05. |
seq_len |
Length used to take discrete points between 0 and
|
An object of class "hdtstest" is a list containing the following components:
MultiTest |
Logical vector with length Q. If the element is |
Chang, J., Jiang, Q., McElroy, T. & Shao, X. (2023). Statistical inference for high-dimensional spectral density matrix.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.