powered by
Simple independence test based on data permutation using distance correlation and partial distance correlation.
dcor.test(x, y, R = 500, type = c("V", "U"))pdcor.test(x, y, z, R = 500, type = c("U", "V"))
pdcor.test(x, y, z, R = 500, type = c("U", "V"))
the data of x
the data of y
the number of replicates
"U" or "V"
the data of controlling variables. Given z, pdcor between x and y is calculated.
# NOT RUN { n = 200 z = rnorm(n) x = rnorm(n)*z y = rnorm(n)*z res1 = dcor.test(x,y,R=500) res2 = pdcor.test(x,y,z,R=500) # }
Run the code above in your browser using DataLab