A multivariate test of independence based on auto-distance correlation matrix proposed by Fokianos and Pitsillou (2016).
mADCFtest(x, type = c("truncated", "bartlett", "daniell", "QS", "parzen"), p,
b = 0, parallel = FALSE, bootMethod = c("Wild Bootstrap",
"Independent Bootstrap"))
multivariate time series.
character string which indicates the smoothing kernel. Possible choices are 'truncated' (the default), 'bartlett', 'daniell', 'QS', 'parzen'.
bandwidth, whose choice is determined by \(p=cn^{\lambda}\) for \(c > 0\) and \(\lambda \in (0,1)\).
the number of bootstrap replicates of the test statistic. It is a positive integer. If b=0 (the default), then no p-value is returned.
logical value. By default, parallel=FALSE. If parallel=TRUE, bootstrap computation is distributed to multiple cores, which typically is the maximum number of available CPUs and is detecting directly from the function.
character string indicating the method to use for obtaining the empirical p-value of the test. Possible choices are "Wild Bootstrap" (the default) and "Independent Bootstrap"
An object of class htest
which is a list containing:
description of test.
the observed value of the test statistic.
bootstrap replicates of the test statistic (if \(b=0\) then replicates
=NULL).
p-value of the test (if \(b=0\) then p.value
=NA).
The method followed for computing the p-value of the test.
description of data (data name, kernel type, 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 independent and identically distributed (i.i.d).
The p-value of the test is obtained via resampling method. Possible choices are the independent wild bootstrap (Dehling and Mikosch, 1994;
Shao, 2010; Leucht and Neumann, 2013) and the independent bootstrap,
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 auto-distance covariance matrix mADCV
.
Dehling, H. and T. Mikosch (1994). Random quadratic forms and the bootstrap for U-statistics. Journal of Multivariate Analysis \(\textbf{51}\), 392-413, http://dx.doi.org/10.1006/jmva.1994.1069
Fokianos K. and M. Pitsillou (2016). Testing pairwise independence for multivariate time series by the auto-distance correlation matrix. Submitted for publication.
Leucht, A. and M. H. Neumann (2013). Dependent wild bootstrap for degenerate U- and V- statistics. Journal of Multivariate Analysis \(\textbf{117}\), 257-280, http://dx.doi.org/10.1016/j.jmva.2013.03.003.
Shao, X. (2010). The dependent wild bootstrap. Journal of the American Statistical Association \(\textbf{105}\), 218-235, http://dx.doi.org/10.1198/jasa.2009.tm08744.
# NOT RUN {
x<-MASS::mvrnorm(300,rep(0,2),diag(2))
n <- length(x)
c <- 3
lambda <- 0.1
p <- ceiling(c*n^lambda)
# }
# NOT RUN {
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