stabtaildepf: Estimation of the Stable Tail Dependence Function

stabtaildepfR Documentation

Estimation of the Stable Tail Dependence Function

Description

Kiriliouk et al. (2016, pp. 364–366) describe a technique for estimation of a empirical stable tail dependence function for a random sample. The function is defined as

\widehat{l}(x,y) = \frac{1}{k}\sum_{i=1}^n \mathbf{1}\bigl[ R_{i,x,n} > n + 1 - kx \mbox{\ or\ } R_{i,y,n} > n + 1 - ky \bigr]\mbox{,}

where \mathbf{1}[\cdot] is an indicator function, R denotes the rank() of the elements and k \in [1,\ldots,n] and k is intended to be “large enough” that \widehat{l}(x,y) has converged to a limit.

The “Capéraà–Fougères smooth” of the empirical stable tail dependence function is defined for a coordinate pair (x,y) as

\widehat{l}_{CF}(x,y) = 2 \sum_{i \in I_n} \widehat{p}_{3,i} \times \mathrm{max}\bigl[\widehat{W}_i x,\, (1-\widehat{W}_i) y \bigr]\mbox{,}

where \widehat{p}_{3,i} are the weights for the maximum Euclidean likelihood estimator (see spectralmeas) and \widehat{W}_i are the pseudo-polar angles (see spectralmeas) for the index set I_n defined by I_n = \{i = 1, \ldots, n : \widehat{S}_i > \widehat{S}_{(k{+}1)}\}, where \widehat{S}_{(k+1)} denotes the (k{+}1)-th largest observation of the pseudo-polar radii \widehat{S}_i where the cardinality of I_n is exactly k elements long. (Tentatively, then this definition of I_n is ever so slightly different than in spectralmeas.) Lastly, see the multiplier of 2 on the smooth form, and this multiplier is missing in Kiriliouk et al. (2016, p. 365) but shown in Kiriliouk et al. (2016, eq. 17.14, p. 360). Numerical experiments indicate that the 2 is needed for \widehat{l}_{CF}(x,y) but evidently not in \widehat{l}(x,y).

The visualization of l(x,y) commences by setting a constant (c > 0) as c_i \in 0.2,0.4,0.6,0.8 (say). The y are solved for x \in [0,\ldots,c_i] through the l(x,y) for each of the c_i. Each solution set constitutes a level set for the stable tail dependence function. If the bivariate data have asymptotic independence (to the right), then a level set or the level sets for all the c are equal to the lines x + y = c. Conversely, if the bivariate data have asymptotic dependence (to the right), then the level sets will make 90-degree bends for \mathrm{max}(x,y) = c.

Usage

stabtaildepf(uv=NULL, xy=NULL, k=function(n) as.integer(0.5*n), levelset=TRUE,
             ploton=TRUE, title=TRUE, delu=0.01, smooth=FALSE, ...)

Arguments

uv

An R data.frame of u and v nonexceedance probabilities in the respective X (horizontal) and Y (vertical) directions. Note, rank()s are called on these so strictly speaking this need not be as nonexceedance probabilities. This is not an optional argument;

xy

A vector of the scalar coordinates (x,y), which are “the relative distances to the upper endpoints of [these respective] variables” (Kiriliouk et al., 2016, p. 356). This is a major point of nomenclature confusion. If these are in probability units, they are exceedance probabilities. Though tested for NULL and a warning issued, these can be NULL only if levelset=TRUE but can be set to xy=NA if levelset=FALSE and smooth=TRUE (see discussion in Note);

k

The k for both the \widehat{l}(x,y) and \widehat{l}_{CF}, though the effect of k might not quite be the same for each. The default seems to work fairly well;

levelset

A logical triggering the construction of the level sets for c = seq(0.1, 1, by=0.1);

ploton

A logical to call the plot() function;

title

A logical to trigger a title for the plot if ploton=TRUE;

delu

The \Delta x for a sequence of x = seq(0,c,by=delu);

smooth

A logical controlling whether \widehat{l}(x,y) or the Capéraà–Fougères smooth function \widehat{l}_{CF}(x,y) is used; and

...

Additional arguments to pass.

Value

Varies according to argument settings. In particular, the levelset=TRUE will cause an R list to be returned with the elements having the character string of the respective c values and the each holding a data.frame of the (x,y) coordinates.

Note

This function is also called in a secondary recursion mode. The default levelset=TRUE makes a secondary call with levelset=FALSE to compute the \widehat{l}(x,y) for the benefit of the looping on the one-dimensional root to solve for a single y in \widehat{l}(x,y) = c given a single x. If levelset=TRUE and smooth=TRUE, then a secondary call with smooth=TRUE and levelset=FALSE is made to internally return an R list containing scalar N_n and vectors \widehat{W}_n and \widehat{p}_{3,i} for similar looping and one-dimensional rooting for \widehat{l}_{CF}(x,y).

If levelset=FALSE, then xy is required to hold the (x,y) coordinate pair of interest. A demonstration follows and shows the limiting behavior of a random sample from the N4212cop copula.

  n <- 2000 # very CPU intensive this and the next code snippet
  UV <- simCOP(n=n, cop=N4212cop, para=pi); k <- 1:n
  lhat <- sapply(k, function(j)
                 stabtaildepf(xy=c(0.1, 0.1), uv=UV, levelset=FALSE, k=j))
  plot(k, lhat, xlab="k in [1,n]", cex=0.8, lwd=0.8, type="b",
                ylab="Empirical Stable Tail Dependence Function")
  mtext("Empirical function in the 0.10 x 0.10 Pr square (upper left corner)")

The R list that can be used to compute \widehat{l}_{CF}(x,y) is retrievable by

  x <- 0.1; y <- 0.1; k <- 1:(n-1)
  lhatCF <- sapply(k, function(j) {
     Hlis <- stabtaildepf(xy=NA, uv=UV, levelset=FALSE, smooth=TRUE, k=j)
     2*sum(Hlis$p3 * sapply(1:Hlis$Nn, function(i) {
                 max(c(Hlis$Wn[i]*x, (1-Hlis$Wn[i])*y)) }))
  })
  lines(k, lhatCF, col="red")

The smooth line (red) of lhatCF is somewhat closer to the limiting behavior of lhat, but it is problematic to determine computational consistency. Mathematical consistency with Kiriliouk et al. (2016) appears to be achieved. The Examples section TODO.

Author(s)

William Asquith william.asquith@ttu.edu

References

Beirlant, J., Escobar-Bach, M., Goegebeur, Y., Guillou, A., 2016, Bias-corrected estimation of stable tail dependence function: Journal Multivariate Analysis, v. 143, pp. 453–466, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.jmva.2015.10.006")}.

Kiriliouk, Anna, Segers, Johan, Warchoł, Michał, 2016, Nonparameteric estimation of extremal dependence: in Extreme Value Modeling and Risk Analysis, D.K. Dey and Jun Yan eds., Boca Raton, FL, CRC Press, ISBN 978–1–4987–0129–7.

See Also

psepolar, spectralmeas

Examples

## Not run: 
UV <- simCOP(n=1200, cop=GLcop, para=2.1) # Galambos copula
tmp1 <- stabtaildepf(UV) # the lines are curves (strong tail dependence)
tmp2 <- stabtaildepf(UV, smooth=TRUE, ploton=FALSE, col="red") #
## End(Not run)

wasquith/copBasic documentation built on March 10, 2024, 11:24 a.m.