View source: R/dCov.R View source: R/nda.R

dCov | R Documentation |

Calculating distance covariance of two vectors or columns of a matrix for Generalized Network-based Dimensionality Reduction and Analysis (GNDA).

The calculation is very slow for large matrices!

```
dCov(x,y=NULL)
```

`x` |
a numeric vector, a numeric matrix (in this case y=NULL), or a numeric data frame (in this case y=NULL) |

`y` |
a numeric vector (optional) |

If `x`

is a numeric vector, `y`

must be specified. If x is a numeric matrix or numeric data frame, y must be ignored from the parameters.

Either a distance covariance value of vectors `x`

and `y`

, or a distance covariance matrix of `x`

.

Prof. Zsolt T. Kosztyan, Department of Quantitative Methods, Institute of Management, Faculty of Business and Economics, University of Pannonia, Hungary

e-mail: kosztyan.zsolt@gtk.uni-pannon.hu

Rizzo M, Szekely G (2021). _energy: E-Statistics: Multivariate Inference via the Energy of Data_. R package version 1.7-8, <URL: https://CRAN.R-project.org/package=energy>.

```
# Specification of distance covariance value of vectors x and y.
x<-rnorm(36)
y<-rnorm(36)
dCov(x,y)
# Specification of distance covariance matrix.
x<-matrix(rnorm(36),nrow=6)
dCov(x)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.