Distance variance and covariance {Rfast} | R Documentation |
Distance variance and covariance
Description
Distance variance and covariances.
Usage
dvar(x)
dcov(x, y)
Arguments
x |
A numerical matrix or a vector. |
y |
A numerical matrix or a vector. |
Details
The distance variance of a matrix/vector or the distance covariance of two matrices is calculated. For the distance variance of a vector we use the fast method of Huo and Szekely (2016).
Value
The distance covariance or distance variance.
Author(s)
Manos Papadakis
R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr> and Manos Papadakis <papadakm95@gmail.com>.
References
Szekely G.J., Rizzo M.L. and Bakirov N.K.(2007). Measuring and Testing Independence by Correlation of Distances. Annals of Statistics, 35(6):2769-2794.
Huo X. and Szekely G. J. (2016). Fast computing for distance covariance. Technometrics, 58(4): 435-447.
See Also
Examples
x <- as.matrix(iris[1:50, 1:4])
y <- as.matrix(iris[51:100, 1:4])
res <- dcov(x, y)
res <- dvar(x[, 1])
[Package Rfast version 2.1.0 Index]