The directed dependence coefficient (didec
) estimates the degree of directed dependence of a random vector Y on a random vector X, based on an i.i.d. sample of (X,Y).
didec(X, Y, perm = FALSE, perm.method = c("decreasing"))
The degree of directed dependence of the random vector Y on the random vector X.
A numeric matrix or data.frame/data.table. Contains the predictor vector X.
A numeric matrix or data.frame/data.table. Contains the response vector Y.
A logical. If True
a version of didec
is computed that takes into account the permutations (specified by perm.method
) of the response variables.
An optional character string specifying a method for permuting the response variables. This must be one of the strings "sample"
, "increasing"
, "decreasing"
(default) or "full"
. The version "full"
is invariant with respect to permutations of the response variables.
Yuping Wang, Sebastian Fuchs, Jonathan Ansari
The directed dependence coefficient (didec) is an extension of Azadkia & Chatterjee's measure of directed dependence (Azadkia & Chatterjee, 2021) to a vector of response variables introduced in (Ansari & Fuchs, 2023).
Its calculation is based on the function codec
which estimates Azadkia & Chatterjee’s measure of directed dependence and is provided in the R package FOCI
.
By definition, didec
is invariant with respect to permutations of the variables within the predictor vector X. Invariance with respect to permutations within the response vector Y is achieved by computing the arithmetic mean over all possible (or chosen) permutations.
In addition to the option "full"
of running all \(q!\) permutations of \((1, ..., q)\), less computationally intensive options are also available (here, \(q\) denotes the number of response variables): a random selection of \(q\) permutations "sample"
, cyclic permutations such as \((1,2,...,q)\), \((2,...,q,1)\) either "increasing"
or "decreasing"
.
Note that when the number of variables \(q\) is large, choosing "full"
may result in long computation times.
M. Azadkia, S. Chatterjee, A simple measure of conditional dependence, Ann. Stat. 49 (6), 2021.
J. Ansari, S. Fuchs, A simple extension of Azadkia & Chatterjee's rank correlation to multi-response vectors, Available at https://arxiv.org/abs/2212.01621, 2024.