This function estimates and plots the extremal dependence functions \(\chi(u)\) and \(\bar \chi(u)\) against a grid of values in [0,1] to analyse the extremal dependence of two variables.
depchi(X, Y, thresval = c(0:99)/100, tit = "", indgraph = TRUE, bothest = TRUE,
xlegend = "topleft",mfrow=c(1,2),...)
Numeric vector. Values of the first variable.
Numeric vector. Values of the second variable.
Numeric vector. Grid values where the functions \(\chi(u)\) and \(\bar \chi(u)\) are evaluated.
Character string. A title for the plots.
Logical flag. If it is TRUE, plots are shown in separate windows.
If it is FALSE, the layout in mfrow
is used.
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.
Optional. Label "topleft","bottomright", etc. Position where the legend on the graph will be located.
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
.
A list with elements
Estimated \(\chi (u)\) function for Y given X evaluated at the threshold grid.
Estimated \(\chi (u)\) function for X given Y evaluated at the threshold grid.
Estimated \(\bar \chi (u) \) function for Y given X evaluated at the threshold grid.
Estimated \(\bar \chi (u)\) function for X given Y evaluated at the threshold grid.
Estimation of the probabilities \(P(U<thresval)\).
Estimation of the probabilities \(P(V<thresval)\).
Estimation of the probabilities \(P[(U<thresval)\&(V<thresval)]\).
Input argument.
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 \(\chi\) and \(\bar \chi\) are defined as \(\chi= \lim_{u \to 1} \chi(u)\) where \(\chi(u)= P(U>u |V>u)\) and (U,V) are the transformed uniform marginals of the variables X and Y.
\(\bar \chi= \lim_{u \to 1} \bar \chi(u)\) where \(\bar \chi(u)= 2log P(U>u)/log P(U>u, V>u)-1\).
The function plots \(\chi(u)\) and \(\bar \chi(u)\). These graphs can be used to estimate \(\hat \chi\) and \(\widehat{\bar \chi}\), the limits of the functions. In the \(\chi (u)\) plot, the expected behaviour under independence of X and Y is also plotted.
\(\chi\) is on the scale [0, 1], with the set (0, 1] corresponding to asymptotic dependence, and the measure \(\bar \chi\) 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.
Coles, S., Heffernan, J. and Tawn, J. (1999) Dependence measures for extreme value analysis. Extremes, 2, 339-365.
# NOT RUN {
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")
# }
Run the code above in your browser using DataLab