mADCFtest(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
).mADCFtest
performs a test of multivariate independence. In particular, the function computes a test statistic for testing whether the data are i.i.d.
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 given by
$$\sum_{j=1}^{n-1}(n-j)k^2(j/p)\mbox{tr}{\hat{V}^{*}(j)\hat{D}^{-1}\hat{V}(j)\hat{D}^{-1}}$$
where $\hat{D}^{-1}=diag{\hat{V}_{11}(0), \dots, \hat{V}_{dd}(0)}$ with $d$ indicating the dimension of the multivariate time series
and $\hat{V}_{rm}(0)$ is obtained from the elements of the corresponding matrix mADCV
.
$\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$. $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).
mADCVtest
performs the same test based on the distance covariance matrix mADCV
.mADCF
, mADCV
, mADCVtest
x<-MASS::mvrnorm(300,rep(0,2),diag(2))
n <- length(x)
c <- 3
lambda <- 0.1
p <- ceiling(c*n^lambda)
mT=mADCFtest(x,type="tr",p=p,b=499,parallel=TRUE)
mF=mADCFtest(x,type="tr",p=p,b=499,parallel=FALSE)
Run the code above in your browser using DataLab