# depchi.fun: Estimates extremal dependence measures between two variables In IndTestPP: Tests of Independence Between Point Processes in Time

## Description

This function estimates the extremal dependence coefficients χ and \bar χ by Coles et al. (1999). It also plots the functions χ(u) and \bar χ(u) against a grid of values in [0,1] to analyse the extremal dependence of two variables.

## Usage

 1 2 depchi.fun(X, Y, thresval = c(0:99)/100, tit = "", indgraph = TRUE, bothest = TRUE, xlegend = "topleft") 

## Arguments

 X Numeric vector. Values of the first variable. Y Numeric vector. Values of the second variable. thresval Numeric vector. Grid values where the functions χ(u) and \bar χ(u) are evaluated. tit Character string. A title for the plots. indgraph Logical flag. If it is TRUE, plots are carried out in individual windows. If it is FALSE, windows with 2 \times 1 plots are used. bothest Logical flag. If it is TRUE, two estimated coefficientes (for X given Y and for Y given X) are displayed in the same plot. Otherwise, only the coefficient for Y given X is plotted. xlegend Optional. Label "topleft" or"bottomright". Position where the legend on the graph will be located.

## Details

The extremal dependence between two variables X and Y is the tendency for one variable to be large, given that the other one is large. The extremal dependence coefficients χ and \bar χ are defined as χ= \lim_{u \to 1} χ(u) and \bar χ(u)= 2log(P(U>u)/log P(U>u, V>u)-1, where χ(u)= P(U>u |V>u) and (U,V) are the transformed uniform marginals of the variables X and Y.

χ is on the scale [0, 1], with the set (0, 1] corresponding to asymptotic dependence, and the measure \bar χ falls within the range [-1, 1], with the set [-1, 1) corresponding to asymptotic independence. Thus, the complete pair (χ, \bar χ) is required as a summary of extremal dependence: (χ > 0, \bar χ =1) signifies asymptotic dependence, in which case the value of χ determines a measure of strength of dependence within the class; alternatively, (χ=0, \bar χ <1) signifies asymptotic independence, in which case the value of \bar χ determines the strength of dependence within this class. Full details can be found in Coles et al. (1999).

In the χ plot, the expected behaviour under independence of X and Y is also plotted.

## Value

A list with elements

 chiX  Estimated χ function for Y given X evaluated at the threshold grid. chiY  Estimated χ function for X given Y evaluated at the threshold grid. chiBX  Estimated \bar χ function for Y given X evaluated at the threshold grid. chiBY  Estimated \bar χ function for X given Y evaluated at the threshold grid. PX  Estimation of the probabilities P(U

## References

Coles, S., Heffernan, J. and Tawn, J. (1999) Dependence measures for extreme value analysis. Extremes, 2, 339-365.

TestIndNH.fun, DutilleulPlot.fun, CondTest.fun
 1 2 3 4 data(BarTxTn) aux<-depchi.fun(X=BarTxTn$Tx,Y=BarTxTn$Tn, thresval = c(0:99)/100, tit = "Barcelona", xlegend = "topleft")