Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

RDM (version 0.1.1)

rdm: Rearranged dependence measure

Description

This function estimates the asymmetric dependence between X and Y using the rearranged dependence measure Rμ(X,Y) for different possible underlying measures μ. A value of 0 characterizes independence of X and Y, while a value of 1 characterizes a functional relationship between X and Y, i.e. Y=f(X).

Usage

rdm(
  X,
  method = c("spearman", "kendall", "dss", "zeta1", "bkr", "all"),
  bandwidth_method = c("fixed", "cv", "cvsym"),
  bandwidth_parameter = 0.5,
  permutation = FALSE,
  npermutation = 1000,
  checkInput = FALSE
)

Value

The estimated value of the rearranged dependence measure

Arguments

X

A bivariate data.frame containing the observations. Each row contains one bivariate observation.

method

Options include "spearman", "kendall", "bkr", "dss", "chatterjee" and "zeta1".The option "all" returns the value for all aforementioned methods.

bandwidth_method

A character string indicating the use of either a cross-validation principle (square or non-square) or a fixed bandwidth (oftentimes called resolution).

bandwidth_parameter

A numerical vector which contains the necessary optional parameters for the exponent of the chosen bandwidth method. In case of N observations, the bandwidth_parameter (s1,s2) determines a lower bound Ns1 and upper bound Ns2 for the cross-validation methods or a single number s for the fixed bandwidth method resulting in Ns. The parameters have to lie in (0,1/2) and fulfil s1<s2.

permutation

Whether or not to perform a permutation test

npermutation

Number of repetitions of the permutation test

checkInput

Whether or not to perform validity checks of the input

Details

This function estimates Rμ(X,Y) using the empirical checkerboard mass density A. To arrive at Rμ(X,Y), A is appropriately sorted and then evaluated for the underlying measure. The estimated Rμ always takes values between 0 and 1 with

  • Rμ(X,Y)=0 if and only if X and Y are independent.

  • Rμ(X,Y)=1 if and only if Y=f(X) for some measurable function f.

Currently, the following underlying measures are implemented:

  • "spearman" Implements the concordance measure Spearman's ρ (which is identical to the L1-Schweizer-Wolff-measure),

  • "kendall" Implements the concordance measure Kendall's τ,

  • "bkr" Implements the Blum–Kiefer–Rosenblatt R, also known as the L2-Schweizer-Wolff-measure <doi:10.1214/aos/1176345528>,

  • "dss" Implements the Dette-Siburg-Stoimenov measure of complete dependence <doi:10.1111/j.1467-9469.2011.00767.x>, also known as Chatterjee's ξ <doi:10.1080/01621459.2020.1758115>,

  • "zeta1" Implements the ζ1-measure of complete dependence established by W. Trutschnig <doi:10.1016/j.jmaa.2011.06.013>.

The estimation of the checkerboard mass density A depends on the choice of the bandwidth for the checkerboard copula. For a detailed discussion of "cv" and "cvsym", see computeBandwidth.

Examples

Run this code
n <- 50
X <- cbind(runif(n), runif(n))
rdm(X, method="spearman", bandwidth_method="fixed", bandwidth_parameter=.3)
n <- 20
U <- runif(n)
rdm(cbind(U, U), method="spearman", bandwidth_method="cv", bandwidth_parameter=c(0.25, 0.5))

Run the code above in your browser using DataLab