View source: R/distance_cov_cor.R
Distance correlation | R Documentation |
Distance correlation.
dcor(x, y)
bcdcor(x, y)
x |
A numerical matrix. |
y |
A numerical matrix. |
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 (see dcor.ttest
).
For the bias corrected distance correlation its value only. For the distance correlation a list including:
dcov |
The distance covariance. |
dvarX |
The distance variance of x. |
dvarY |
The distance variance of Y. |
dcor |
The distance correlation. |
Manos Papadakis
R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr> and Manos Papadakis <papadakm95@gmail.com>.
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.
dcov, dcor.ttest, edist
x <- as.matrix(iris[1:50, 1:4])
y <- as.matrix(iris[51:100, 1:4])
res<-dcor(x, y)
res<-bcdcor(x, y)
x<-y<-NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.