dcov: Distance Covariance

View source: R/RcppExports.R

dcovR Documentation

Distance Covariance

Description

Distance Covariance

Usage

dcov(x,y)

Arguments

x

numeric vector

y

numeric vector

Details

Implements the algorithm described in Chaudhuri, Hu (2019) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.csda.2019.01.016")} which only has O(n log(n)) complexity.

Value

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

Examples

## Not run: 

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

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


## End(Not run)

dccpp documentation built on Sept. 27, 2023, 9:08 a.m.