View source: R/distance_cov_cor.R
Hypothesis test for the distance correlation | R Documentation |
Hypothesis test for the distance correlation.
dcor.ttest(x, y, logged = FALSE)
x |
A numerical matrix. |
y |
A numerical matrix. |
logged |
Do you want the logarithm of the p-value to be returned? If yes, set this to TRUE. |
The bias corrected distance correlation is used. The hypothesis test is whether the two matrices are independent or not. Note, that this test is size correct as both the sample size and the dimensionality goes to infinity. It will not have the correct type I error for univariate data or for matrices with just a couple of variables.
A vector with 4 elements, the bias corrected distance correlation, the degrees of freedom, the test statistic and its associated p-value.
Manos Papadakis
R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr> and Manos Papadakis <papadakm95@gmail.com>.
G.J. Szekely, M.L. Rizzo and N. K. Bakirov (2007). Measuring and Testing Independence by Correlation of Distances. Annals of Statistics, 35(6):2769-2794.
bcdcor, dcov, edist
x <- as.matrix(iris[1:50, 1:4])
y <- as.matrix(iris[51:100, 1:4])
res<-dcor.ttest(x, y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.