Skip to content

Instantly share code, notes, and snippets.

@akbertram akbertram/dcor-bench.R Secret
Last active Dec 20, 2015

What would you like to do?
# Find correlated pairs of variables
# in a simulated dataset
findCorellations <- function(pairs, n) {
for(i in 1:pairs) {
dx <- rnorm(n)
dy <- rnorm(n)
dcor <- DCOR(dx, dy)
# Time the calculation for increasing number of
# observations
for(n in c(1000,2000,5000,6000,7000,8000,10000,25000)) {
cat(sprintf("n = %d\n",n))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.