MyNixOS website logo
Description

Quantification of Asymmetric Dependence.

A copula-based measure for quantifying asymmetry in dependence and associations. Documentation and theory about 'qad' is provided by the paper by Junker, Griessenberger & Trutschnig (2021, <doi:10.1016/j.csda.2020.107058>), and the paper by Trutschnig (2011, <doi:10.1016/j.jmaa.2011.06.013>).

qad

CRANstatus


Summary

The R-package qad (short for quantification of asymmetric dependence) allows to estimate the (directed) dependence of two random variables X and Y. The estimated population value q(X,Y) introduced in [1,3] fulfills the following properties:

  • q(X,Y) = 1 if and only if Y is a function of X (knowing X means knowing Y)
  • q(X,Y) = 0 if and only if X and Y are independent (no information gain).

While the Pearson correlation coefficient assesses only linear and Spearman rank correlation only monotonic relationships, qad is able to detect any kind of association. For further information we refer to the vignette or the related publications [1,2,3].

Installation

The easiest way to get the package qad is:

install.packages("qad")

In order to install the development version of qad from GitHub:

# install devtools package
if (!requireNamespace("devtools", quietly = TRUE)) {
  install.packages("devtools")
}
# install package
devtools::install_github("griefl/qad", dependencies = TRUE)

Usage

library(qad)

set.seed(314)
n <- 100
x <- rnorm(n)
y <- x^2 + rnorm(n, 0, 1)
plot(x,y, pch = 16)
fit <- qad(x,y)
#> 
#> quantification of asymmetric dependence: 
#> 
#> Data: x1 := x
#>       x2 := y
#> 
#> Sample Size: 100
#> Number of unique ranks: x1: 100
#>                         x2: 100
#>                    (x1,x2): 100
#> Resolution: 10 x 10
#> 
#> Dependence measures:
#>                     q p.values
#>  q(x1,x2)       0.610    0.000
#>  q(x2,x1)       0.393    0.002
#>  max.dependence 0.610    0.000
#> 
#>                      a p.values
#>  asymmetry       0.217       NA
coef(fit)
#>         q(x1,x2)         q(x2,x1)   max.dependence        asymmetry 
#>            0.610            0.393            0.610            0.217 
#>       p.q(x1,x2)       p.q(x2,x1) p.max.dependence      p.asymmetry 
#>            0.000            0.002            0.000               NA

#Comparison with correlation
cor(x,y, method = "pearson")
#> [1] -0.04404337
cor(x,y, method = "spearman")
#> [1] 0.06546655
cor(x,y, method = "kendall")
#> [1] 0.05090909

References

  • [1] R.R. Junker, F. Griessenberger, W. Trutschnig: Estimating scale-invariant directed dependence of bivariate distributions, Computational Statistics and Data Analysis, (2021), 153, 107058, https://doi.org/10.1016/j.csda.2020.107058

  • [2] R.R. Junker, F. Griessenberger, W. Trutschnig: A copula-based measure for quantifying asymmetry in dependence and associations, https://arxiv.org/abs/1902.00203

  • [3] W. Trutschnig: On a strong metric on the space of copulas and its induced dependence measure, Journal of Mathematical Analysis and Applications, 2011, (384), 690-705. https://doi.org/10.1016/j.jmaa.2011.06.013

Metadata

Version

1.0.4

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows