dcov: Distance covariance matrix.

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/dependencemeasures.R

Description

Compute the distance covariance measure of Szekely, Rizzo, and Bakirov (2007) between two samples. Warning: Only valid to compute the distance covariance for two random variables X and Y. This means that X and Y cannot be random Vectors. If this is the case, consider the package energy.

Usage

1
dcov(x, y, Cpp = TRUE)

Arguments

x

data of first sample

y

data of second sample

Cpp

logical. If TRUE (the default), computations are performed using a C version of the code.

Details

See energy.

Value

returns the sample distance covariance.

Author(s)

Martin Bilodeau (bilodeau@dms.umontreal.ca) and Pierre Lafaye de Micheaux (lafaye@unsw.edu.au)

References

Szekely, G.J., Rizzo, M.L., and Bakirov, N.K. (2007), Measuring and Testing Dependence by Correlation of Distances, Annals of Statistics, Vol. 35 No. 6, pp. 2769-2794.
https://dx.doi.org/10.1214/009053607000000505

See Also

covrob, corrob

Examples

1
2
data(stackloss)
dcov(stackloss$Air.Flow,stackloss$Water.Temp)

Example output

Loading required package: rrcov
Loading required package: robustbase
Scalable Robust Estimators with High Breakdown Point (version 1.4-3)

[1] 2.911769

groc documentation built on Dec. 18, 2020, 9:07 a.m.

Related to dcov in groc...