RTDEdata: Data object used for a Tail Dependence model

dataRTDER Documentation

Data object used for a Tail Dependence model

Description

Data object used for a Tail Dependence model.

Usage

dataRTDE(obs, simu.nb, simu.marg=c("ufrechet", "upareto"), 
    simu.cop=c("indep", "FGM", "Frank"), simu.cop.par=NULL,
    contamin.eps=NULL, contamin.method=c("NA","max+","+"),
    contamin.marg=c("ufrechet", "upareto"),
    contamin.cop=c("indep", "FGM", "Frank"),
    contamin.cop.par=NULL, control=list())


## S3 method for class 'dataRTDE'
print(x, ...)
## S3 method for class 'dataRTDE'
summary(object, ...)
## S3 method for class 'dataRTDE'
plot(x, which=1:2, ...)

Arguments

obs

bivariate numeric dataset.

simu.nb

a numeric for the sample size of simulated data.

simu.marg

a character string for the marginal distribution: either "ufrechet" (default) or "upareto".

simu.cop

a character string ofr the copula: either "indep" (default), "FGM" or "Frank".

simu.cop.par

a numeric for the copula parameter, default to NULL.

contamin.eps

a numeric for the percentage (of simu.nb) of contaminated data.

contamin.method

a character string for the contamination method: either "NA" (default), "max+" or "+".

contamin.marg

a character string for the marginal distribution: either "ufrechet" (default) or "upareto".

contamin.cop

a character string ofr the copula: either "indep" (default), "FGM" or "Frank".

contamin.cop.par

a numeric for the copula parameter, default to NULL.

control

A list of control paremeters. Unused.

x, object

an R object inheriting from "dataRTDE".

...

arguments to be passed to subsequent methods.

which

an integer (1 or 2) to specify whether to plot in original scale or unit-Pareto scale, respectively.

Details

The function dataRTDE handles empirical or simulated data and may add a contamination.

Empirical data

When obs is provided, dataRTDE just wraps the two-column matrix (X_i, Y_i)_i.

Simulated data

When simu.XXX are provided, dataRTDE simulates random vectors (X_i, Y_i)_i from the copula simu.cop with parameter simu.cop.par and marginal simu.marg.

Note that end-user must choose between empirical data (obs is provided) and simulated data (simu.XXX are provided). Not both can be provided. In addition to data handling (X_i, Y_i)_i, a contamination can be processed by adding new simulated points (\tilde X_i, \tilde Y_i)_i when contamin.method != "NA". Those points (\tilde X_i, \tilde Y_i)_i are simulated from the copula contamin.cop with parameter contamin.cop.par and marginal contamin.cop.par. If contamin.method != "+", the points (\tilde X_i, \tilde Y_i)_i are the contaminations, while if contamin.method != "max+" the contaminations are obtained by adding the component-wise maximum of the data: (\tilde X_i + X_{n,n}, \tilde Y_i)_i + Y_{n,n}, where X_{n,n}=max(X_1,...,X_n), idem for Y_{n,n}.

Value

dataRTDE returns an object of class "dataRTDE" having the following components:

n

rownumber of data.

n0

rownumber of contamin.

data

original or simulated data.

contamin

contaminated data.

Author(s)

Christophe Dutang

References

C. Dutang, Y. Goegebeur, A. Guillou (2014), Robust and bias-corrected estimation of the coefficient of tail dependence, Volume 57, Insurance: Mathematics and Economics

This work was supported by a research grant (VKR023480) from VILLUM FONDEN and an international project for scientific cooperation (PICS-6416).

See Also

See fitRTDE for the fitting process and zvalueRTDE for the z-value computation.

Examples


#####
# (1) simulation

n <- 100
x <- dataRTDE(simu.nb=n, simu.marg="ufrechet", simu.cop="indep")
print(x)
summary(x)
plot(x, xlab="x", ylab="y")

#####
# (2) part of the workers' compensation dataset

x1 <- c(
  21.798086,  22.640528,  22.572010,  24.789710,  25.876764,  28.033613,
  22.525887,  12.004031,  12.713178,  13.596610,  14.811727,  12.774073,
  20.245789,  24.242468,  50.216515,  56.099793,  58.109747,  67.807105,
  73.852437,  84.208474,  83.604216,  19.507341,  20.810822,  23.838122,
  24.212193,  25.367578,  35.401344,  37.580989,  12.428727,  13.492474,
  23.471988,  24.101833,  24.766193,  26.078216)

x2 <- c(
 0.538707, 0.439184, 1.059775, 0.560013, 1.004997, 1.097314, 0.609833, 0.270222,
 0.229566, 0.596850, 0.196539, 0.134248, 0.489312, 0.418218, 0.769208, 0.649707,
 0.503919, 0.675466, 0.545745, 1.562266, 0.931762, 0.291125, 0.499927, 0.151084,
 0.141910, 0.300373, 0.119761, 0.141300, 0.377662, 0.169574, 0.243585, 0.061215,
 0.055272, 0.312816, 0.160196, 0.623029, 0.280707, 0.174422, 0.176666, 0.153907,
 0.605122, 0.664457, 0.348918, 0.370878)

obs <- dataRTDE(cbind(x1, x2))
obs
summary(obs)

plot(obs)


RTDE documentation built on Oct. 16, 2024, 5:08 p.m.