taildepCoeff: Tail dependence coefficients

View source: R/gr_taildepCoeff.R

taildepCoeffR Documentation

Tail dependence coefficients

Description

It computes parametric (Huesler-Reiss) or non-parametric Tail dependence coefficients - See www.gremes.info "Application - Danube" for usage of TDCs.

Usage

taildepCoeff(obj, ...)

## S3 method for class 'Network'
taildepCoeff(obj, k_ratio, v, correction = FALSE, ...)

## S3 method for class 'HRMtree'
taildepCoeff(obj, v, ...)

Arguments

obj

should be of class Network or HRMtree or a subclass of these, such as Tree, BlochGraph as subclasses of Network or subclasses MME, MLE1, MLE2, EKS, EKS_part, EngHitz, MLEave, MMEave of class HRMtree.

...

additional arguments

k_ratio

the number of upper order statistics divided by the total number of observations

v

a named vector of coordinates, the names should correspond to the names of the nodes in the graph in obj

correction

adds a correction of one half to n-k in computing the event x > n - k + 1/2. Default is FALSE, hence n-k.

Value

A scalar representing the value of the tdc. If the obj is of class Network the TDC are non-parametric. If the obj is of class HRMtree or its subclasses respectively the TDC are parametric.

Examples

# non-parametric tdc
g<- graph(c(1,2,2,3), directed=FALSE)
g<- set.vertex.attribute(g, "name", V(g), c("a", "b", "c")) # name the nodes
data<- matrix(rnorm(1000*3), 1000,3)
colnames(data)<- c("a", "b", "c")  # name the columns
net<- Network(x = g, data = data)
v<- c(1,0,1)
names(v)<- c("a", "b", "c")
taildepCoeff(net, 0.2, v = v, correction = TRUE)
# parametric tdc
g<- graph(c(1,2,2,3), directed=FALSE)
g<- set.vertex.attribute(g, "name", V(g), c("a", "b", "c")) # name the nodes
obj<- HRMtree(g)
obj<- setParams(obj, c(0.5,0.6))
taildepCoeff(obj, v)

gremes documentation built on Feb. 16, 2023, 8:06 p.m.