groc (version 1.0.6)

dcov: Distance covariance matrix.

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

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.

Value

returns the sample distance covariance.

Details

See energy.

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. http://dx.doi.org/10.1214/009053607000000505

See Also

covrob, corrob

Examples

Run this code
# NOT RUN {
data(stackloss)
dcov(stackloss$Air.Flow,stackloss$Water.Temp)
# }

Run the code above in your browser using DataLab