Skip to contents

Functions to compute the Chatterjee correlation.

Usage

chatterjee_correlation(x, y)

Arguments

x

A numeric vector.

y

A numeric vector.

Value

A two-element numeric vector containing the test statistic and the p-value.

See also

Boost Documentation for more details on the mathematical background.

Examples

x <- c(1, 2, 3, 4, 5)
y <- c(2, 3, 5, 7, 11)
# Chatterjee correlation
chatterjee_correlation(x, y)
#> [1] 0.5