mADCVtest(x, type = c("truncated", "bartlett", "daniell", "QS", "parzen"), p,
b = 0, parallel = FALSE)
htest
which is a list containing:replicates
=NULL).p.value
=NA).type
, bandwidth, p
, and the number of bootstrap replicates b
).mADCVtest
performs a test of multivariate independence. In particular, the function tests whether there are no auto- and cross-correlations
in a multivariate time series. The p-value of the test is obtained via the independent wild bootstrap (Shao, 2010; Leucht and Neumann, 2013),
with b
replicates. The observed statistic is
$$\sum_{j=1}^{n-1}(n-j)k^2(j/p)\mbox{tr}{\hat{V}^{*}(j)\hat{V}(j)}$$
where $\hat{V}^{*}(\cdot)$ denotes the complex conjugate matrix of $\hat{V}(\cdot)$ obtained from mADCV
, and
$\mbox{tr}{A}$ denotes the trace of a matrix $A$, which is the sum of the diagonal elements of $A$. $k(\cdot)$ is a kernel function computed by kernelFun
and p
is a bandwidth or lag order whose
choice is further discussed in Fokianos and Pitsillou (2016).
Under the null hypothesis of independence and some further assumptions about the kernel function $k(\cdot)$, the standardized version of the
test statistic follows $N(0,1)$ asymptotically and it is consistent. More
details of the asymptotic properties of the statistic can be found in Fokianos and Pitsillou (2016).
mADCFtest
performs the same test based on the distance correlation matrix mADCF
.mADCV
, mADCF
, mADCFtest
x<-MASS::mvrnorm(500,rep(0,2),diag(2))
n <- length(x)
c <- 3
lambda <- 0.1
p <- ceiling(c*n^lambda)
mT=mADCVtest(x,type="bar",p=p,b=499,parallel=TRUE)
mF=mADCVtest(x,type="bar",p=p,b=499,parallel=FALSE)
Run the code above in your browser using DataLab