Distance correlation {mvcor} | R Documentation |
Distance correlation
Description
Distance correlation.
Usage
dcor(y, x, bc = FALSE)
Arguments
y |
A numerical matrix. |
x |
A numerical matrix. |
bc |
Do you want the corrected distance correlation? Default value if FALSE. |
Details
The distance correlation or the bias corrected distance correlation of two matrices is calculated. The latter one is used for the hypothesis test that the distance correlation is zero.).
Value
A list including:
dcov |
The (bias corrected) distance covariance. |
dvarX |
The (bias corrected) distance variance of x. |
dvarY |
The (bias corrected) distance variance of Y. |
dcor |
The (bias corrected) distance correlation. |
Author(s)
Michail Tsagris
R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr>.
References
G.J. Szekely, M.L. Rizzo and N. K. Bakirov (2007). Measuring and Testing Independence by Correlation of Distances. Annals of Statistics, 35(6): 2769–2794.
Szekely G. J. and Rizzo M. L. (2023). The energy of data and distance correlation. Chapman and Hall/CRC.
See Also
Examples
dcor( as.matrix(iris[, 1:2]), as.matrix(iris[, 3:4]) )
dcor( as.matrix(iris[, 1:2]), as.matrix(iris[, 3:4]), bc = TRUE )