Skip to content

Dependence measures

The copula of a random vector fully encodes its dependence structure. However, copulas are infinite-dimensional objects and interpreting their properties can be difficult as the dimension increases. Therefore, the literature has introduced quantifications of the dependence structure that may be used as univariate (imperfect but useful) summaries of certain copula properties. We implement the most well-known ones in this package.

Core dependence metrics τ, ρ, β, γ and ι

Definition: Kendall' τ

For a copula C with a density c, regardless of its dimension d, Kendall's τ is defined as:

τ=2d2d11C(u)c(u)du12d11
Definition: Spearman's ρ

For a copula C with a density c, regardless of its dimension d, Spearman's ρ is defined as:

ρ=2d(d+1)2dd1C(u)dud+12d(d+1).
Definition: Definition (Blomqvist's β):

For a copula C with a density c, regardless of its dimension d, Blomqvist's β is defined as:

β=2d12d11(C(12)+C¯(12))12d11.

where C¯ is the survival copula associated with C.

Definition: Definition (Gini's γ):

For a copula C with a density c, regardless of its dimension d, the multivariate Gini’s gamma is defined as [15]:

γ=1b(d)a(d)[[0,1]d{A(u)+A¯(u)}dC(u)a(d)],

with

A(u)=12(min(u)+max(i=1duid+1,0)),A¯(u)=12(1max(u)+max(1i=1dui,0)),

where the normalizing constants depend only on the dimension d and match our implementation:

a(d)=1d+1+1(d+1)!(independence),b(d)=2+41d3(comonotonicity).
Definition: Definition (Copula entropy ι):

For a copula C with density c, the copula entropy is

ι(C)=[0,1]dc(u)logc(u)du.

It satisfies I(X1,,Xd)=ι(C) (see [16]).

These dependence measures are very common when d=2, and a bit less when d>2. We sometimes refer to the Kendall's matrix or the Spearman's matrix for the collection of bivariate coefficients associated with a multivariate copula. We thus provide two different interfaces:

  • Copulas.τ(), Copulas.ρ(), Copulas.β(), Copulas.γ() and Copulas.ι() provide the upper formulas, yielding a scalar whatever the dimension of the copula.

  • StatsBase.corkendall(), StatsBase.corspearman(), Copulas.corblomqvist(), Copulas.corgini() and Copulas.corentropy() provide matrices of pairwise dependence metrics.

  • All these functions have methods for a single argument C::Copula, yielding theoretical quantities, and for a dataset data::AbstractMatrix yielding empirical estimates.

For historical reasons, τ(data), ρ(data), β(data), γ(data), ι(data) require (d,n)-shaped datasets (observations or pseudo-observations), while corkendall(data), corspearman(data), corblomqvist(data), corgini(data), and corentropy(data) do require transposed (n,d)-shaped datasets.

Tip: Ranges of τ, ρ, β and γ.

Kendall's τ, Spearman's ρ, Blomqvist's β and Gini's γ all belong to [1,1]. They are equal to :

  • 0 if and only if the copula is a IndependentCopula.

  • -1 is and only if the copula is a WCopula.

  • 1 if and only if the copula is a MCopula.

They do not depend on the marginals. This is why we say that they measure the 'strength' of the dependency.

Todo: Work in progress

The package implements generic version of the dependence metrics, but some families have faster versions (closed form formulas or better integration paths). However, all the potential fast-paths are not implemented yet. If you feel a specific method for a certain copula is missing, do not hesitate to open an issue !

Many copula estimators are based on the relationship between parameters and these coefficients (see e.g., [1719]). Here is for example the relationship between the Kendall τ and the parameter of a Clayton copula:

julia
using Copulas, Plots, Distributions
θs = -1:0.1:5
τs = [Copulas.τ(ClaytonCopula(2, θ)) for θ in θs]
plot(θs, τs; xlabel="θ", ylabel="τ", title="θ -> τ for bivariate Clayton", legend=false)

Remark the clear and easy to exploit bijection.

Tail dependency

Many people are interested in the tail behavior of their dependence structures. Tail coefficients summarize this tail behavior.

Definition: Tail dependency

For a copula C, we define the upper tail statisticss (when they exist):

λU(u)=12uC(u,..,u)1uλU=limu1λU(u)[0,1]χU(u)=2ln(1u)ln(12u+C(u,...,u))1χU=limu1χU(u)[1,1]

Simetric tools can be constructed for the lower tail:

λL(u)=C(u,..,u)uλL=limu0+λL(u)[0,1]χL(u)=2ln(u)ln(C(u,...,u))1χL=limu0+χ(u)[1,1]

When λU>0 (resp λL>0), we say that there is strong upper (resp lower) tail dependency, and χU=1 (resp χL=1). When λU>0 (resp λL>0), if furthermore χU0 (resp χL0), we say that there is weak upper tail dependency. Otherwise we ay there is no tail dependency. Thus, the graph of λL(u),χL(u) over [0,12], and the graph of λU(u),χU(u) over [12,1] are usefull tools to diagnose the potential limits.

julia
using Copulas, Distributions, Plots
λᵤ(C::Copulas.Copula{d}, u) where d = (1 - 2u - cdf(C, fill(u,d)))/(1-u)
χᵤ(C::Copulas.Copula{d}, u) where d = 2 * log1p(- u) / log1p(- 2u + cdf(C, fill(u,d))) - 1

C = GumbelCopula(2, 2.5)
plot(0.9:0.001:0.999, Base.Fix1(λᵤ, C); xlabel="u", label="λᵤ(u)", title="Graph of λᵤ(u) and χᵤ(u)  for Gumbel Copula")
plot!(0.9:0.001:0.999, Base.Fix1(χᵤ, C); label="χᵤ(u)")

julia
C = ClaytonCopula(2, 2.5)
plot(0.9:0.001:0.999, Base.Fix1(λᵤ, C); xlabel="u", label="λᵤ(u)", title="Graph of λᵤ(u) and χᵤ(u) for Clayton Copula")
plot!(0.9:0.001:0.999, Base.Fix1(χᵤ, C); label="χᵤ(u)")

All these coefficients quantify the behavior of the dependence structure, generally or in the extremes, and are therefore widely used in the literature either as verification tools to assess the quality of fits, or even as parameters. Many parametric copula families have simple surjections, injections, or even bijections between these coefficients and their parametrization, allowing matching procedures of estimation (similar to moment matching algorithms for fitting standard random variables).

The package provides both theoretical limits (for a given copula object) and empirical estimators (from data matrices). In addition, pairwise tail-dependence matrices can be computed for multivariate samples.

  • Theoretical λ: Copulas.λₗ(C::Copula) and Copulas.λᵤ(C::Copula) Shortcuts: Copulas.λₗ(C), Copulas.λᵤ(C)

  • Empirical λ: Copulas.λₗ(U::AbstractMatrix; p=1/√m) and Copulas.λᵤ(U::AbstractMatrix; p=1/√m)

  • Pairwise λ-matrix: Copulas.coruppertail(data; method=:SchmidtStadtmueller, p=1/√m) and Copulas.corlowertail(data; method=:SchmidtStadtmueller, p=1/√m)

These follow the approach of Schmidt & Stadtmüller (see [20]).

References

  1. J. Behboodian, A. Dolati and M. Úbeda-Flores. A multivariate version of Gini's rank association coefficient. Statistical Papers 48, 295–304 (2007).

  2. J. Ma and Z. Sun. Mutual information is copula entropy. Tsinghua Science and Technology 16, 51–54 (2011).

  3. C. Genest, J. Nešlehová and N. Ben Ghorbal. Estimators Based on Kendall's Tau in Multivariate Copula Models. Australian & New Zealand Journal of Statistics 53, 157–177 (2011).

  4. G. A. Fredricks and R. B. Nelsen. On the Relationship between Spearman's Rho and Kendall's Tau for Pairs of Continuous Random Variables. Journal of Statistical Planning and Inference 137, 2143–2150 (2007).

  5. A. Derumigny and J.-D. Fermanian. À propos des tests de l'hypothèse simplificatrice pour les copules conditionnelles. JDS2017, 6 (2017).

  6. R. Schmidt and U. Stadtmüller. Non-parametric estimation of tail dependence. Scandinavian journal of statistics 33, 307–335 (2006).