meantrix / corrp

Compute multiple types of correlations analysis (Pearson correlation, R^2 coefficient of linear regression, Cramer's V measure of association, Distance Correlation,The Maximal Information Coefficient, Uncertainty coefficient and Predictive Power Score) in large dataframes with mixed columns classes(integer, numeric, factor and character) in parallel backend.
https://meantrix.github.io/corrp/
GNU General Public License v3.0
5 stars 1 forks source link

`dcorT_test()` gives different results from `energy::dcorT.test()` #16

Open malcolmbarrett opened 2 weeks ago

malcolmbarrett commented 2 weeks ago

Is this expected?

# from ?energy::dcorT.test
x <- matrix(rnorm(100), 10, 10)
y <- matrix(runif(100), 10, 10)

corrp::dcorT_test(x, y)
#> $statistic
#> [1] 1.714039
#> 
#> $parameter
#> [1] 34
#> 
#> $p.value
#> [1] 0.04781297
#> 
#> $estimate
#> [1] 0.2820229
#> 
#> $method
#> [1] "dcor t-test of independence for high dimension"
#> 
#> $data.name
#> [1] "x and y"
energy::dcorT.test(x, y)
#> 
#>  dcor t-test of independence for high dimension
#> 
#> data:  x and y
#> T = -0.38926, df = 34, p-value = 0.6502
#> sample estimates:
#> Bias corrected dcor 
#>         -0.06660884

Created on 2024-11-11 with reprex v2.1.1

PHS-Meantrix commented 2 weeks ago

The function is designed to calculate when x and y have one column, as this is the only way it is used within the package. I will check how the function can be modified to support multiple columns.