Title: | Robust Tail Dependence Estimation |
---|---|
Description: | Robust tail dependence estimation for bivariate models. This package is based on two papers by the authors:'Robust and bias-corrected estimation of the coefficient of tail dependence' and 'Robust and bias-corrected estimation of probabilities of extreme failure sets'. This work was supported by a research grant (VKR023480) from VILLUM FONDEN and an international project for scientific cooperation (PICS-6416). |
Authors: | Christophe Dutang [aut, cre] , Armelle Guillou [ctb] , Yuri Goegebeur [ctb] |
Maintainer: | Christophe Dutang <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.2-2 |
Built: | 2024-11-16 06:05:53 UTC |
Source: | https://github.com/cran/RTDE |
Data object used for a Tail Dependence model.
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, ...)
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, ...)
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 |
simu.cop |
a character string ofr the copula:
either |
simu.cop.par |
a numeric for the copula parameter, default to |
contamin.eps |
a numeric for the percentage (of |
contamin.method |
a character string for the contamination method:
either |
contamin.marg |
a character string for the marginal distribution:
either |
contamin.cop |
a character string ofr the copula:
either |
contamin.cop.par |
a numeric for the copula parameter, default to |
control |
A list of control paremeters. Unused. |
x , object
|
an R object inheriting from |
... |
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. |
The function dataRTDE
handles empirical or simulated data and may
add a contamination.
When obs
is provided, dataRTDE
just wraps the
two-column matrix .
When simu.XXX
are provided,
dataRTDE
simulates random vectors
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 ,
a contamination can be processed by adding new simulated points
when
contamin.method != "NA"
.
Those points are simulated from the copula
contamin.cop
with parameter contamin.cop.par
and marginal contamin.cop.par
.
If contamin.method != "+"
, the points are the contaminations,
while if
contamin.method != "max+"
the contaminations are obtained by adding the
component-wise maximum of the data: ,
where
, idem for
.
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.
Christophe Dutang
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 fitRTDE
for the fitting process and
zvalueRTDE
for the z-value computation.
##### # (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)
##### # (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)
Density function, distribution function, quantile function, random generation.
dEPD(x, eta, delta, rho, tau, log = FALSE) pEPD(q, eta, delta, rho, tau, lower.tail=TRUE, log.p = FALSE) qEPD(p, eta, delta, rho, tau, lower.tail=TRUE, log.p = FALSE, control=list()) rEPD(n, eta, delta, rho, tau)
dEPD(x, eta, delta, rho, tau, log = FALSE) pEPD(q, eta, delta, rho, tau, lower.tail=TRUE, log.p = FALSE) qEPD(p, eta, delta, rho, tau, lower.tail=TRUE, log.p = FALSE, control=list()) rEPD(n, eta, delta, rho, tau)
x , q
|
vector of quantiles. |
p |
vector of probabilities. |
n |
number of observations. If |
eta |
first shape parameter. |
delta |
nuisance parameter. |
rho , tau
|
second shape parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are
|
control |
A list of control paremeters. See section Details. |
The extended Pareto distribution is defined by the following density
for all when parametrized by
.
However, a typical parametrization is obtained by
setting
, i.e.
for all when parametrized by
.
The control
argument is a list that can supply any of the
following components:
upperbound
The upperbound used in the optimize
function
when computing numerical quantiles, default to 1e6
.
tol
the desired accuracy used in the optimize
function
when computing numerical quantiles, default to 1e-9
.
dEPD
gives the density,
pEPD
gives the distribution function,
qEPD
gives the quantile function, and
rEPD
generates random deviates.
The length of the result is determined by n
for
rEPD
, and is the maximum of the lengths of the
numerical parameters for the other functions.
The numerical parameters other than n
are recycled to the
length of the result. Only the first elements of the logical
parameters are used.
Christophe Dutang
J. Beirlant, E. Joossens, J. Segers (2009), Second-order refined peaks-over-threshold modelling for heavy-tailed distributions, Journal of Statistical Planning and Inference, Volume 139, Issue 8, Pages 2800-2815.
C. Dutang, Y. Goegebeur, A. Guillou (2014), Robust and bias-corrected estimation of the coefficient of tail dependence, 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).
##### # (1) density function x <- seq(0, 5, length=24) cbind(x, dEPD(x, 1/2, 1/4, -1)) ##### # (2) distribution function cbind(x, pEPD(x, 1/2, 1/4, -1, lower=FALSE))
##### # (1) density function x <- seq(0, 5, length=24) cbind(x, dEPD(x, 1/2, 1/4, -1)) ##### # (2) distribution function cbind(x, pEPD(x, 1/2, 1/4, -1, lower=FALSE))
Density function, distribution function, quantile function, random generation.
dFGM(u, v, alpha, log = FALSE) pFGM(u, v, alpha, lower.tail=TRUE, log.p = FALSE) qFGM(p, alpha, lower.tail=TRUE, log.p = FALSE) rFGM(n, alpha)
dFGM(u, v, alpha, log = FALSE) pFGM(u, v, alpha, lower.tail=TRUE, log.p = FALSE) qFGM(p, alpha, lower.tail=TRUE, log.p = FALSE) rFGM(n, alpha)
u , v
|
vector of quantiles. |
p |
vector of probabilities. |
n |
number of observations. If |
alpha |
shape parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are
|
The FGM is defined by the following distribution function
for all in [0,1] and
in [0,1].
When
lower.tail=FALSE
, pFGM
returns the survival copula
.
dFGM
gives the density,
pFGM
gives the distribution function,
qFGM
gives the quantile function, and
rFGM
generates random deviates.
The length of the result is determined by n
for
rFGM
, and is the maximum of the lengths of the
numerical parameters for the other functions.
The numerical parameters other than n
are recycled to the
length of the result. Only the first elements of the logical
parameters are used.
Christophe Dutang
Nelsen, R. (2006), An Introduction to Copula, Second Edition, Springer.
##### # (1) density function u <- v <- seq(0, 1, length=25) cbind(u, v, dFGM(u, v, 1/2)) cbind(u, v, outer(u, v, dFGM, alpha=1/2)) ##### # (2) distribution function cbind(u, v, pFGM(u, v, 1/2)) cbind(u, v, outer(u, v, pFGM, alpha=1/2))
##### # (1) density function u <- v <- seq(0, 1, length=25) cbind(u, v, dFGM(u, v, 1/2)) cbind(u, v, outer(u, v, dFGM, alpha=1/2)) ##### # (2) distribution function cbind(u, v, pFGM(u, v, 1/2)) cbind(u, v, outer(u, v, pFGM, alpha=1/2))
Fit a Tail Dependence model with a Robust Estimator.
fitRTDE(obs, nbpoint, alpha, omega, method="MDPDE", fix.arg=list(rho=-1), boundary.method="log", control=list()) ## S3 method for class 'fitRTDE' print(x, ...) ## S3 method for class 'fitRTDE' summary(object, ...) ## S3 method for class 'fitRTDE' plot(x, which=1:2, main, ...)
fitRTDE(obs, nbpoint, alpha, omega, method="MDPDE", fix.arg=list(rho=-1), boundary.method="log", control=list()) ## S3 method for class 'fitRTDE' print(x, ...) ## S3 method for class 'fitRTDE' summary(object, ...) ## S3 method for class 'fitRTDE' plot(x, which=1:2, main, ...)
obs |
bivariate numeric dataset. |
nbpoint |
a numeric for the number of largest points to be selected. |
alpha |
a numeric for the power divergence parameter. |
omega |
a numeric for omega, see section Details. |
method |
a character string equals to |
fix.arg |
a named list of fixed arguments:
either |
boundary.method |
a character string: either "log" or "simple", see section Details. |
control |
A list of control paremeters. See section Details. |
x , object
|
an R object inheriting from |
... |
arguments to be passed to subsequent methods. |
which |
an integer (1 or 2) to specify whether to plot eta or delta, respectively. |
main |
a main title for the plot. |
The function fitRTDE
fits an extended Pareto distribution
( are fitted while
is fixed)
on the relative excess of
(see
zvalueRTDE
)
using a robust estimator based on the minimum distance power
divergence criterion (see MDPD
).
The boundary enforcement on is either done
by the bounded BFGS algorithm (see
optim
with
method="L-BFGS-B"
) or by the bounded Nelder-Mead
algorithm (see constrOptim
with
method="Nelder-Mead"
) .
fitRTDE
returns an object of class "fitRTDE"
having the following components:
n
rownumber of data
.
n0
rownumber of contamin
.
alpha
a vector of alpha
parameters.
omega
a vector of omega
parameters.
m
a vector of nbpoint
.
rho
a numeric for rho
.
eta
estimate of .
delta
estimate of .
Ztilde
see zvalueRTDE
.
Christophe Dutang
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).
##### # (1) simulation omega <- 1/2 m <- 48 n <- 100 obs <- cbind(rupareto(n), rupareto(n)) + rupareto(n) #function of m system.time( x <- fitRTDE(obs, nbpoint=m:(n-m), 0, 1/2) ) x summary(x) plot(x, which=1) plot(x, which=2)
##### # (1) simulation omega <- 1/2 m <- 48 n <- 100 obs <- cbind(rupareto(n), rupareto(n)) + rupareto(n) #function of m system.time( x <- fitRTDE(obs, nbpoint=m:(n-m), 0, 1/2) ) x summary(x) plot(x, which=1) plot(x, which=2)
Density function, distribution function, quantile function, random generation.
dfrank(u, v, alpha, log = FALSE) pfrank(u, v, alpha, lower.tail=TRUE, log.p = FALSE) qfrank(p, alpha, lower.tail=TRUE, log.p = FALSE) rfrank(n, alpha)
dfrank(u, v, alpha, log = FALSE) pfrank(u, v, alpha, lower.tail=TRUE, log.p = FALSE) qfrank(p, alpha, lower.tail=TRUE, log.p = FALSE) rfrank(n, alpha)
u , v
|
vector of quantiles. |
p |
vector of probabilities. |
n |
number of observations. If |
alpha |
shape parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are
|
The Frank is defined by the following distribution function
for all in [0,1].
When
lower.tail=FALSE
, pfrank
returns the survival copula
.
dfrank
gives the density,
pfrank
gives the distribution function,
qfrank
gives the quantile function, and
rfrank
generates random deviates.
The length of the result is determined by n
for
rfrank
, and is the maximum of the lengths of the
numerical parameters for the other functions.
The numerical parameters other than n
are recycled to the
length of the result. Only the first elements of the logical
parameters are used.
Christophe Dutang
Nelsen, R. (2006), An Introduction to Copula, Second Edition, Springer.
##### # (1) density function u <- v <- seq(0, 1, length=25) cbind(u, v, dfrank(u, v, 1/2)) cbind(u, v, outer(u, v, dfrank, alpha=1/2)) ##### # (2) distribution function cbind(u, v, pfrank(u, v, 1/2)) cbind(u, v, outer(u, v, pfrank, alpha=1/2))
##### # (1) density function u <- v <- seq(0, 1, length=25) cbind(u, v, dfrank(u, v, 1/2)) cbind(u, v, outer(u, v, dfrank, alpha=1/2)) ##### # (2) distribution function cbind(u, v, pfrank(u, v, 1/2)) cbind(u, v, outer(u, v, pfrank, alpha=1/2))
Density function, distribution function, quantile function, random generation.
dfrechet(x, shape, xmin, log = FALSE) pfrechet(q, shape, xmin, lower.tail=TRUE, log.p = FALSE) qfrechet(p, shape, xmin, lower.tail=TRUE, log.p = FALSE) rfrechet(n, shape, xmin) dufrechet(x, log = FALSE) pufrechet(q, lower.tail=TRUE, log.p = FALSE) qufrechet(p, lower.tail=TRUE, log.p = FALSE) rufrechet(n)
dfrechet(x, shape, xmin, log = FALSE) pfrechet(q, shape, xmin, lower.tail=TRUE, log.p = FALSE) qfrechet(p, shape, xmin, lower.tail=TRUE, log.p = FALSE) rfrechet(n, shape, xmin) dufrechet(x, log = FALSE) pufrechet(q, lower.tail=TRUE, log.p = FALSE) qufrechet(p, lower.tail=TRUE, log.p = FALSE) rufrechet(n)
x , q
|
vector of quantiles. |
p |
vector of probabilities. |
n |
number of observations. If |
shape |
shape parameter. |
xmin |
lower bound parameter. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are
|
The Frechet distribution is defined by the following density
for all .
The unit Frechet distribution corresponds to
xmin=0
and
shape=1
.
dfrechet, dufrechet
give the density,
pfrechet, pufrechet
give the distribution function,
qfrechet, qufrechet
give the quantile function, and
rfrechet, rufrechet
generate random deviates.
The length of the result is determined by n
for
rfrechet, rufrechet
, and is the maximum of the lengths of the
numerical parameters for the other functions.
The numerical parameters other than n
are recycled to the
length of the result. Only the first elements of the logical
parameters are used.
Christophe Dutang
Kotz, S. and Nadarajah, S. (2000), Extreme Value Distributions: Theory and Applications, Imperial College Press.
Beirlant, J., Goegebeur, Y., Teugels, J., Segers (2004), Statistics of Extremes: Theory and Applications, John Wiley and Sons.
##### # (1) density function x <- seq(0, 5, length=24) cbind(x, dfrechet(x, 1/2, 1/4)) ##### # (2) distribution function cbind(x, pfrechet(x, 1/2, 1/4))
##### # (1) density function x <- seq(0, 5, length=24) cbind(x, dfrechet(x, 1/2, 1/4)) ##### # (2) distribution function cbind(x, pfrechet(x, 1/2, 1/4))
Computes the power divergence statistics then used a minimization problem.
MDPD(theta, densfun, obs, alpha, ..., control=list())
MDPD(theta, densfun, obs, alpha, ..., control=list())
theta |
the parameter of the distribution given as a vector. |
densfun |
a function computing the theoretical density function. |
obs |
a numeric vector of observations |
alpha |
a numeric for the power divergence parameter. |
... |
further arguments to be passed to the density function. |
control |
A list of control paremeters. See section Details. |
The Power Divergence for a density function and
observations
is defined as
for
for .
The control
argument is a list that can supply any of the
following components:
eps
a small positive floating-point number used when
integrate
stalled, default to 1e-3
.
tol
the desired accuracy used in the integrate
function
when computing the power divergence, default to 1e-3
.
lower
the lower bound of the domain of the density function, default to 1.
upper
the lower bound of the domain of the density function, default to infinity.
MDPD
returns the power divergence against the density function densfun
as a numeric.
Christophe Dutang
Basu, A., Harris, I.R., Hjort, N.L., Jones, M.C., (1998). Robust and efficient estimation by minimizing a density power divergence, Biometrika, 85, 549-559.
C. Dutang, Y. Goegebeur, A. Guillou (2014), Robust and bias-corrected estimation of the coefficient of tail dependence, 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).
##### # (1) small example omega <- 1/2 m <- 10 n <- 100 obs <- cbind(rupareto(n), rupareto(n)) + rupareto(n) #unit Pareto transform z <- zvalueRTDE(obs, omega, nbpoint=m, output="relexcess") MDPD(c(1/2, 1/4), dEPD, z$Z, alpha=0, rho=-1)
##### # (1) small example omega <- 1/2 m <- 10 n <- 100 obs <- cbind(rupareto(n), rupareto(n)) + rupareto(n) #unit Pareto transform z <- zvalueRTDE(obs, omega, nbpoint=m, output="relexcess") MDPD(c(1/2, 1/4), dEPD, z$Z, alpha=0, rho=-1)
Plot the quantile-quantile Pareto plot
qqparetoplot(x, ..., highlight=c("red","cross"))
qqparetoplot(x, ..., highlight=c("red","cross"))
x |
data vector. |
highlight |
character string used in |
... |
further arguments for |
qqparetoplot
plots the quantile-quantile Pareto plot
and may highlight some points having name "new"
.
Invisible list with component x
for the x-coordinates
and y
for the y-coordinates.
Christophe Dutang
##### # (1) small examples set.seed(1234) x <- rupareto(100) qqparetoplot(x) x <- rexp(100) qqparetoplot(x)
##### # (1) small examples set.seed(1234) x <- rupareto(100) qqparetoplot(x) x <- rexp(100) qqparetoplot(x)
Data object used for a Tail Dependence model.
RTDE(obs=NULL, simu=list(), contamin=list(), nbpoint, alpha, omega, method="MDPDE", fix.arg=list(rho=-1), boundary.method="log", core=1, keepdata, control=list()) ## S3 method for class 'RTDE' print(x, ...) ## S3 method for class 'RTDE' summary(object, ...) ## S3 method for class 'RTDE' plot(x, which=1:3, FUN=mean, main, ...) prob(object, q, ...) ## Default S3 method: prob(object, q, ...) ## S3 method for class 'RTDE' prob(object, q, ...)
RTDE(obs=NULL, simu=list(), contamin=list(), nbpoint, alpha, omega, method="MDPDE", fix.arg=list(rho=-1), boundary.method="log", core=1, keepdata, control=list()) ## S3 method for class 'RTDE' print(x, ...) ## S3 method for class 'RTDE' summary(object, ...) ## S3 method for class 'RTDE' plot(x, which=1:3, FUN=mean, main, ...) prob(object, q, ...) ## Default S3 method: prob(object, q, ...) ## S3 method for class 'RTDE' prob(object, q, ...)
obs |
bivariate numeric dataset. |
simu |
a names list with components:
|
contamin |
a names list with components:
|
nbpoint |
a numeric for the number of largest points to be selected. |
alpha |
a numeric for the power divergence parameter. |
omega |
a numeric for omega, see section Details. |
method |
a character string equals to |
fix.arg |
a named list of fixed arguments:
either |
boundary.method |
a character string: either "log" or "simple", see section Details. |
core |
a numeric for the number of core to be used, only relevant for simulated data. |
keepdata |
a logical whether to return or not the dataset. |
control |
A list of control paremeters for |
x , object
|
an R object inheriting from |
... |
arguments to be passed to subsequent methods. |
which |
an integer to specify what to plot: 1 eta, 2 delta, 3 probability estimates. |
FUN |
the function to be applied, default to |
main |
a main title for the plot. |
q |
vector of quantiles. |
The function RTDE
handles (empirical or simulated) data
(cf. dataRTDE
)
and then fits a bivariate tail model using a method
criterion
(cf. fitRTDE
and MDPD
) based
on an extended Pareto distribution approximation (EPD
).
Typical distributions for simulated data and/or contaminations are
For a good introduction, please refer to references.
RTDE
returns an object of class "RTDE"
having the following components:
obs.type
see dataRTDE
.
data
see dataRTDE
.
fit
see fitRTDE
.
simu
see dataRTDE
.
contamin
see dataRTDE
.
setting
a list summarizing the computation.
Christophe Dutang
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 fitRTDE
for the fitting process and
dataRTDE
for the data-handling process.
##### # (1) simulation n <- 100 x <- RTDE(simu=list(nb=n, marg="ufrechet", cop="indep", replicate=1), nbpoint=10:11, alpha=0, omega=1/2) x summary(x)
##### # (1) simulation n <- 100 x <- RTDE(simu=list(nb=n, marg="ufrechet", cop="indep", replicate=1), nbpoint=10:11, alpha=0, omega=1/2) x summary(x)
Density function, distribution function, quantile function, random generation.
dupareto(x, log = FALSE) pupareto(q, lower.tail=TRUE, log.p = FALSE) qupareto(p, lower.tail=TRUE, log.p = FALSE) rupareto(n)
dupareto(x, log = FALSE) pupareto(q, lower.tail=TRUE, log.p = FALSE) qupareto(p, lower.tail=TRUE, log.p = FALSE) rupareto(n)
x , q
|
vector of quantiles. |
p |
vector of probabilities. |
n |
number of observations. If |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are
|
The extended Pareto distribution is defined by the following density and distribution function
for all .
dupareto
gives the density,
pupareto
gives the distribution function,
qupareto
gives the quantile function, and
rupareto
generates random deviates.
The length of the result is determined by n
for
rupareto
, and is the maximum of the lengths of the
numerical parameters for the other functions.
The numerical parameters other than n
are recycled to the
length of the result. Only the first elements of the logical
parameters are used.
Christophe Dutang
Johnson, N.L., Kotz, S. and Balakrishnan, N. (2000), Continuous Univariate Distributions, Volume 1, Second Edition, John Wiley and Sons.
##### # (1) density function x <- seq(0, 5, length=24) cbind(x, dupareto(x)) ##### # (2) distribution function cbind(x, pupareto(x))
##### # (1) density function x <- seq(0, 5, length=24) cbind(x, dupareto(x)) ##### # (2) distribution function cbind(x, pupareto(x))
Compute the Z-value variable from a bivariate dataset.
zvalueRTDE(obs, omega, nbpoint, output=c("orig", "relexcess"), marg=c("upareto", "ufrechet", "uunif")) ## S3 method for class 'zvalueRTDE' print(x, ...) ## S3 method for class 'zvalueRTDE' summary(object, ...) relexcess(x, nbpoint, ...) ## Default S3 method: relexcess(x, nbpoint, ...) ## S3 method for class 'zvalueRTDE' relexcess(x, nbpoint, ...)
zvalueRTDE(obs, omega, nbpoint, output=c("orig", "relexcess"), marg=c("upareto", "ufrechet", "uunif")) ## S3 method for class 'zvalueRTDE' print(x, ...) ## S3 method for class 'zvalueRTDE' summary(object, ...) relexcess(x, nbpoint, ...) ## Default S3 method: relexcess(x, nbpoint, ...) ## S3 method for class 'zvalueRTDE' relexcess(x, nbpoint, ...)
obs |
bivariate numeric dataset. |
omega |
a numeric for omega, see Details. |
nbpoint |
a numeric for the number of largest points to be selected. |
output |
a character string for the output:
either |
marg |
a character string for the empirical margin transformation:
either |
x , object
|
an R object inheriting from |
... |
arguments to be passed to subsequent methods. |
Given a bivariate dataset of
points,
two variables are defined:
(1) for
output="orig"
, the variable
where is the margin transformation and
;
(2) for
output="relexcess"
, the variable
where equals
nbpoint
, ,
and
are the order statistics of
.
The margin transformation is
respectively for unit Pareto (marg="upareto"
),
unit Frechet (marg="ufrechet"
) and unit uniform margin
(marg="uunif"
).
zvalueRTDE
computes the Z-variable and
returns an object of class "zvalueRTDE"
having the following components type
(either
"orig"
or "relexcess"
), omega
,
Ztilde
or Z
, n
, possibly m
.
relexcess
computes the relative excesses
from a Z-variable and returns an object of class "zvalueRTDE"
of type "relexcess"
.
Christophe Dutang
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 fitRTDE
for the fitting process and
dataRTDE
for the data-handling process.
##### # (1) example omega <- 1/2 m <- 10 n <- 100 obs <- cbind(rupareto(n), rupareto(n)) + rupareto(n) #unit Pareto transform zvalueRTDE(obs, omega, output="orig") relexcess(zvalueRTDE(obs, omega, output="orig"), m) zvalueRTDE(obs, omega, nbpoint=m, output="relexcess")
##### # (1) example omega <- 1/2 m <- 10 n <- 100 obs <- cbind(rupareto(n), rupareto(n)) + rupareto(n) #unit Pareto transform zvalueRTDE(obs, omega, output="orig") relexcess(zvalueRTDE(obs, omega, output="orig"), m) zvalueRTDE(obs, omega, nbpoint=m, output="relexcess")