dcor | R Documentation |
Distance Correlation
dcor(x,y)
x |
numeric vector |
y |
numeric vector |
Returns a numeric value: the distance correlation between x and y.
## Not run:
set.seed(1)
x < -rnorm(1000)
y < -x ^ 2
dcor(x, y) # dcor shows dependence between x and y
cor(x, y) # cor does not detect any depencence due to nonlinearity
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.