Distance Covariance

dcov(x,y)

Arguments

x

numeric vector

y

numeric vector

Value

Returns a numeric value: the distance covariance between x and y.

Details

Implements the algorithm described in Chaudhuri, Hu (2019) doi: 10.1016/j.csda.2019.01.016 which only has O(n log(n)) complexity.

Examples

if (FALSE) {

set.seed(1)
x < -rnorm(1000)
y < -x ^ 2

dcov(x, y)
dvov(x, x)
dvov(y, y)

}