SpecTest() implements a new global test proposed in Chang et al. (2022) for the following hypothesis testing problem: [REMOVE_ME]H0:fi,j(ω)=0forany(i,j)∈Iandω∈JversusH1:H0isnottrue,[REMOVEME2]
where fi,j(ω) represents the cross-spectral density between xt,i and xt,j at frequency ω with xt,i being the i-th component of the p×1 times series xt. Here, I is the set of index pairs of interest, and J is the set of frequencies.
SpecTest(X, J.set, cross.indices, B =1000, flag_c =0.8)
Arguments
X: An n×p data matrix X=(x1,…,xn)′, where n is the number of observations of the p×1 time series {xt}t=1n.
J.set: A vector representing the set J
of frequencies.
cross.indices: An r×2 matrix representing the set 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∈(0,1] of the flat-top kernel for estimating fi,j(ω) [See (2) in Chang et al. (2022)]. The default is 0.8.
Returns
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.
Description
SpecTest() implements a new global test proposed in Chang et al. (2022) for the following hypothesis testing problem:
where fi,j(ω) represents the cross-spectral density between xt,i and xt,j at frequency ω with xt,i being the i-th component of the p×1 times series xt. Here, I is the set of index pairs of interest, and J is the set of frequencies.
Examples
# Example 1## Generate xtn <-200p <-10flag_c <-0.8B <-1000burn <-1000z.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 Jcross.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
References
Chang, J., Jiang, Q., McElroy, T. S., & Shao, X. (2022). Statistical inference for high-dimensional spectral density matrix. arXiv preprint. tools:::Rd_expr_doi("doi:10.48550/arXiv.2212.13686") .