Type: Package
Title: Rank Distance Correlation Coefficient
Version: 1.0
Date: 2025-12-01
Author: Michail Tsagris [aut, cre]
Maintainer: Michail Tsagris <mtsagris@uoc.gr>
Depends: R (≥ 4.0)
Imports: dcov, Rfast, Rfast2
Description: The rank distance correlation <doi:10.1080/01621459.2020.1782223> is computed. Included also is a function to perform permutation based testing.
License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
NeedsCompilation: no
Packaged: 2025-12-01 19:11:54 UTC; mtsag
Repository: CRAN
Date/Publication: 2025-12-08 08:20:02 UTC

Rank Distance Correlation Coefficient

Description

The rank distance correlation of Shi H., Drton M. and Han F. (2022) is computed. Included also is a function to perform permutation based testing.

Details

Package: rdcor
Type: Package
Version: 1.0
Date: 2025-12-01
License: GPL-2

Maintainers

Michail Tsagris mtsagris@uoc.gr.

Author(s)

Michail Tsagris mtsagris@uoc.gr.

References

Shi H., Drton M. and Han F. (2022). Distribution-free consistent independence tests via center-outward ranks and signs. Journal of the American Statistical Association, 117(537): 395–410.

Zhang Q. (2025). On the connections between Chatterjee's correlation and rank distance correlation. Journal of Nonparametric Statistics, 1–18.


Permutation-based hypothesis testing for the rank distance correlation

Description

Permutation-based hypothesis testing for the rank distance correlation.

Usage

rdcor.test(y, x, B = 499)

Arguments

y

A numerical vector.

x

A numerical vector or a numerical matrix.

B

The number of permutations to implement.

Details

Permutation-based hypothesis testing between y and x or between y and each column of x is performed.

Value

If x is a vector a vector with the rank distance correlation and the permuation-based p-value. If x is a matrix, this returns a matrix with two columns: the rank distance correlation and the permutation-based p-value.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

Shi H., Drton M. and Han F. (2022). Distribution-free consistent independence tests via center-outward ranks and signs. Journal of the American Statistical Association, 117(537): 395–410.

Zhang Q. (2025). On the connections between Chatterjee's correlation and rank distance correlation. Journal of Nonparametric Statistics, 1–18.

See Also

rdcor, rdcor.mat

Examples

y <- iris[, 1]
x <- matrix( rnorm(150 * 10), ncol = 10 )
rdcor.test(y, x)

Rank distance correlation

Description

Rank distance correlation.

Usage

rdcor(y, x)

Arguments

y

A numerical vector.

x

A numerical vector or a numerical matrix.

Details

This computes the rank distance correlation between y and x, or between y and each column of x.

Value

A vector with the rank distance correlation().

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

Shi H., Drton M. and Han F. (2022). Distribution-free consistent independence tests via center-outward ranks and signs. Journal of the American Statistical Association, 117(537): 395–410.

Zhang Q. (2025). On the connections between Chatterjee's correlation and rank distance correlation. Journal of Nonparametric Statistics, 1–18.

See Also

rdcor.test, rdcor.mat

Examples

y <- iris[, 1]
x <- matrix( rnorm(150 * 10), ncol = 10 )
rdcor(y, x)

Rank distance correlation matrix

Description

Rank distance correlation matrix.

Usage

rdcor.mat(x, B = 1)

Arguments

x

A numerical matrix.

B

The number of permutations to implement to compute the p-value. If B = 1, no p-value is returned.

Details

The function computes the rank distance correlation matrix and optionally performs permutation-based hypothesis testing.

Value

A list including:

r

The rank distance correlation matrix.

pvalue

A matrix with the associated p-values, if B>1, otherwise NULL.

Author(s)

Michail Tsagris and Nikolaos Kontemeniotis .

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

Shi H., Drton M. and Han F. (2022). Distribution-free consistent independence tests via center-outward ranks and signs. Journal of the American Statistical Association, 117(537): 395–410.

Zhang Q. (2025). On the connections between Chatterjee's correlation and rank distance correlation. Journal of Nonparametric Statistics, 1–18.

See Also

rdcor, rdcor.test

Examples

x <- as.matrix(iris[, 1:4])
rdcor.mat(x)