depchi: Estimating extremal dependence coefficientes

Description Usage Arguments Details Value References See Also Examples

View source: R/depchi.R

Description

This function estimates and plots the extremal dependence 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(X, Y, thresval = c(0:99)/100, tit = "", indgraph = TRUE, bothest = TRUE, 
       xlegend = "topleft",mfrow=c(1,2),...)

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 shown in separate windows. If it is FALSE, the layout in mfrow is 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","bottomright", etc. Position where the legend on the graph will be located.

mfrow

Optional. A vector of the form c(2, 1) or c(1,2). It gives the layout to draw the two figures in the function.

...

Further arguments to be passed to the function plot.

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) where χ(u)= P(U>u |V>u) and (U,V) are the transformed uniform marginals of the variables X and Y.

\bar χ= \lim_{u \to 1} \bar χ(u) where \bar χ(u)= 2log P(U>u)/log P(U>u, V>u)-1.

The function plots χ(u) and \bar χ(u). These graphs can be used to estimate \hat χ and \widehat{\bar χ}, the limits of the functions. In the χ (u) plot, the expected behaviour under independence of X and Y is also plotted.

χ 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. See Coles et al. (1999) for more details on the definition and interpretation of these indexes.

Value

A list with elements

chiX

Estimated χ (u) function for Y given X evaluated at the threshold grid.

chiY

Estimated χ (u) function for X given Y evaluated at the threshold grid.

chiBX

Estimated \bar χ (u) function for Y given X evaluated at the threshold grid.

chiBY

Estimated \bar χ (u) function for X given Y evaluated at the threshold grid.

PX

Estimation of the probabilities P(U<thresval).

PY

Estimation of the probabilities P(V<thresval).

PXY

Estimation of the probabilities P[(U<thresval)\&(V<thresval)].

thresval

Input argument.

References

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

See Also

CountingCor, BinPer

Examples

1
2
3
4
data(TxBHZ)

aux<-depchi(X=TxBHZ$TxZ,Y=TxBHZ$TxH, thresval = c(0:99)/100, 
	tit = "Tx Zaragoza and Tx Huesca", xlegend = "bottom",indgraph="FALSE")

IndTestPP documentation built on Aug. 29, 2020, 1:06 a.m.