# dcov: Distance covariance In dcov: A Fast Implementation of Distance Covariance

## Description

This method implements the method to compute the value of distance covariance proposed by Székely et al.(2007) and Székely and Rizzo(2013) by Armadillo library. For distance covariance between two one dimensional variables, the fast algorithm proposed by Huo and Székely(2016) is used.

## Usage

 ```1 2 3``` ```dcov(x, y, type = c("V", "U")) dcor(x, y, type = c("V", "U")) ```

## Arguments

 `x` the matrix of x `y` the matrix of y `type` "V" or "U", for V- or U-statistics of distance covariance or correlation. The default value is "V".

## Note

Note that the result of `dcov(x,y,"V")` and `dcor(x,y,"V")` is same with the result of energy::dcov(x,y)^2 and energy::dcor(x,y)^2. The result of `dcov(x,y,'U')` and `dcor(x,y,'U')` is same with the result of `energy::dcovU(x,y)` and `energy::bcdcor(x,y)`.

## References

Székely, G. J., Rizzo, M. L., & Bakirov, N. K. (2007). Measuring and testing dependence by correlation of distances. The annals of statistics, 35(6), 2769-2794.

Székely, G. J., & Rizzo, M. L. (2013). The distance correlation t-test of independence in high dimension. Journal of Multivariate Analysis, 117, 193-213.

Huo, X., & Székely, G. J. (2016). Fast computing for distance covariance. Technometrics, 58(4), 435-447.

 ```1 2 3 4``` ```x = matrix(rnorm(200),100,2) y = matrix(rnorm(200),100,2) dcov(x,y) dcor(x,y) ```