Distance correlation | R Documentation |
Distance correlation.
dcor(y, x, bc = FALSE)
y |
A numerical matrix. |
x |
A numerical matrix. |
bc |
Do you want the corrected distance correlation? Default value if FALSE. |
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.).
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. |
Michail Tsagris
R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr>.
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.
sq.correl, rv
dcor( as.matrix(iris[, 1:2]), as.matrix(iris[, 3:4]) )
dcor( as.matrix(iris[, 1:2]), as.matrix(iris[, 3:4]), bc = TRUE )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.