dcor_t_test | R Documentation |
Performs a distance correlation t-test of multivariate independence, based on the distance correlation t-statistic introduced by Székely and Rizzo (2013). This implementation executes the statistical approach of energy::dcorT.test
, but is written in C++ for improved performance. The function supports testing for dependence between multivariate random vectors and uses a t-distribution approximation under the null hypothesis of independence. Empirical benchmarks indicate that this C++ version can be significantly faster than the original R version in the energy
package, especially for larger sample sizes (e.g., 1.5–3x faster for n = 10,000).
dcor_t_test(x, y)
x |
[ |
y |
[ |
[list
]
returns a list containing:
method |
description of test. |
statistic |
observed value of the test statistic. |
parameter |
degrees of freedom. |
estimate |
bias corrected squared measure of distance correlation between x and y. |
p.value |
p-value of the t-test. |
data.name |
description of data. |
Székely, G. J., & Rizzo, M. L. (2013). The distance correlation t-test of independence in high dimension. Journal of Multivariate Analysis, 117, 193–213. URL: https://doi.org/10.1016/j.jmva.2013.02.012. Székely, G. J., & Rizzo, M. L. (2014). Energy statistics: A class of statistics based on distances. Journal of Statistical Planning and Inference, 143(8), 1249–1272. URL: https://doi.org/10.1016/j.jspi.2013.03.018.
dcor_t_test(iris[, "Petal.Length"], iris[, c("Sepal.Length", "Sepal.Width")])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.