dcov: Distance variance and covariance

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/distance_cov_cor.R

Description

Distance variance and covariances.

Usage

1
2
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

dcor, edist

Examples

1
2
3
4
x <- as.matrix(iris[1:50, 1:4])
y <- as.matrix(iris[51:100, 1:4])
res <- dcov(x, y)
res <- dvar(x[, 1])

Example output

Loading required package: Rcpp
Loading required package: RcppZiggurat

Rfast documentation built on Dec. 11, 2021, 9:59 a.m.