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 ι
For a copula
For a copula
For a copula
where
For a copula
with
where the normalizing constants depend only on the dimension
These dependence measures are very common when
Copulas.τ(),Copulas.ρ(),Copulas.β(),Copulas.γ()andCopulas.ι()provide the upper formulas, yielding a scalar whatever the dimension of the copula.StatsBase.corkendall(),StatsBase.corspearman(),Copulas.corblomqvist(),Copulas.corgini()andCopulas.corentropy()provide matrices of pairwise dependence metrics.All these functions have methods for a single argument
C::Copula, yielding theoretical quantities, and for a datasetdata::AbstractMatrixyielding 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.
Kendall's
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.
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., [17–19]). Here is for example the relationship between the Kendall
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.
For a copula
Simetric tools can be constructed for the lower tail:
When
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)")
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)andCopulas.λᵤ(C::Copula)Shortcuts:Copulas.λₗ(C),Copulas.λᵤ(C)Empirical λ:
Copulas.λₗ(U::AbstractMatrix; p=1/√m)andCopulas.λᵤ(U::AbstractMatrix; p=1/√m)Pairwise λ-matrix:
Copulas.coruppertail(data; method=:SchmidtStadtmueller, p=1/√m)andCopulas.corlowertail(data; method=:SchmidtStadtmueller, p=1/√m)
These follow the approach of Schmidt & Stadtmüller (see [20]).
References
J. Behboodian, A. Dolati and M. Úbeda-Flores. A multivariate version of Gini's rank association coefficient. Statistical Papers 48, 295–304 (2007).
J. Ma and Z. Sun. Mutual information is copula entropy. Tsinghua Science and Technology 16, 51–54 (2011).
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).
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).
A. Derumigny and J.-D. Fermanian. À propos des tests de l'hypothèse simplificatrice pour les copules conditionnelles. JDS2017, 6 (2017).
R. Schmidt and U. Stadtmüller. Non-parametric estimation of tail dependence. Scandinavian journal of statistics 33, 307–335 (2006).