WN_test() implements the white noise tests proposed in Chang, Yao and Zhou
(2017) and Chang et al. (2026+) for the following hypothesis testing problem: $$H_0:\{{\bf y}_t
\}_{t=1}^n\mathrm{\ is\ white\ noise\ \ versus\ \ }H_1:\{{\bf y}_t
\}_{t=1}^n\mathrm{\ is\ not\ white\ noise.} $$
WN_test(
Y,
lag.k = 2,
B = 1000,
method = c("L_inf", "L_2"),
kernel.type = c("QS", "Par", "Bart"),
pre = FALSE,
alpha = 0.05,
control.PCA = list()
)An object of class "hdtstest", which contains the following
components:
The test statistic of the test.
The p-value of the test.
The time lag used in function.
The kernel used in function.
An \(n \times p\) data matrix \({\bf Y} = ({\bf y}_1, \dots , {\bf y}_n )'\), where \(n\) is the number of the observations of the \(p \times 1\) time series \(\{{\bf y}_t\}_{t=1}^n\).
The time lag \(K\) used to calculate the test statistic [See (4) of Chang, Yao and Zhou (2017) and (6) of Chang et al. (2026+).]. The default is 2.
The number of bootstrap replications for calculating the critical value. The default is 1000.
The option for method used in the white noise test. Available options
include: "L_inf" (the default) for the method proposed by Chang, Yao and
Zhou (2017), and "L_2" for the method proposed by Chang et al. (2026+).
The option for choosing the symmetric kernel used
in the estimation of long-run covariance matrix, which is used when
method = "L_inf". Available options include:
"QS" (the default) for the Quadratic spectral kernel, "Par"
for the Parzen kernel, and "Bart" for the Bartlett kernel.
See Chang, Yao and Zhou (2017) for more information.
Logical. This parameter is used when method = "L_inf".
If TRUE (the default), the time series PCA
proposed in Chang, Guo and Yao (2018) should be performed on
\(\{{\bf y}_t\}_{t=1}^n\) before implementing the white noise test [See Remark 1
of Chang, Yao and Zhou (2017)]. The time series PCA is implemented by using
the function PCA_TS with the arguments passed by control.PCA.
The significance level of the test. The default is 0.05.
A list of control arguments passed to the function
PCA_TS when method = "L_inf" and pre = TRUE, including
lag.k, opt, thresh, delta, and the associated
arguments passed to the clime function
(when opt = 2). See 'Details’ in PCA_TS.
Chang, J., He, J., Li, W., & Lin, C. (2026+). An adaptive \(L_2\)-type test for high-dimensional white noise. Preprint.
Chang, J., Guo, B., & Yao, Q. (2018). Principal component analysis for second-order stationary vector time series. The Annals of Statistics, 46, 2094--2124. tools:::Rd_expr_doi("doi:10.1214/17-AOS1613").
Chang, J., Yao, Q., & Zhou, W. (2017). Testing for high-dimensional white noise using maximum cross-correlations. Biometrika, 104, 111--127. tools:::Rd_expr_doi("doi:10.1093/biomet/asw066").
PCA_TS
#Example 1
## Generate data
n <- 200
p <- 10
Y <- matrix(rnorm(n * p), n, p)
## L_inf
res1 <- WN_test(Y, method ="L_inf")
Pvalue1 <- res1$p.value
statistic1 <- res1$statistic
## L_2
res2 <- WN_test(Y, method = "L_2")
Pvalue2 <- res2$p.value
statistic2 <- res2$statistic
Run the code above in your browser using DataLab