gamma_tail {tailplots}R Documentation

Estimate of tail functional g and confidence intervals for g and alpha

Description

This function computes the estimate of g and the associated confidence interval for g as well as alpha, the corresponding shape parameter under the assumption of a gamma model, according to Iwashita and Klar (2024). Three methods are implemented to compute the confidence intervals: a method based on the unbiased variance estimators of the underlying U-statistics, and two resampling methods (jackknife and bootstrap).

Usage

gamma_tail(
  x,
  d,
  confint = FALSE,
  method = c("unbiased", "bootstrap", "jackknife"),
  R = 1000,
  conf.level = 0.95,
  alpha.max = 100
)

Arguments

x

a vector containing the sample data.

d

the threshold for the computation of g.

confint

a boolean value indicating whether a confidence interval should be computed.

method

the method used for computing the confidence intervals (options include unbiased variance estimator, jackknife, and bootstrap).

R

the number of the bootstrap replicates.

conf.level

the confidence level for the interval.

alpha.max

the upper limit of the interval to be searched for the root in an internal routine (the default value of 100 should be increased in case of error).

Details

The function g introduced by Asmussen and Lehtomaa (2017) is used to distinguish between log-concave and log-convex tail behavior. It is defined as:

g(d) = E\left[ \frac{|X_1 - X_2|}{X_1 + X_2} \bigg| X_1 + X_2 > d \right]

where X_1, X_2 are independent and identically distributed (i.i.d.) positive random variables. For gamma distributions, g takes a constant value, making it a useful tool for detecting gamma-tailed distributions.

This function estimates g(d) using U-statistics. The estimator \hat{g}(d) is given by:

\hat{g}(d) = \frac{ U^{(1)}_n (d) }{ U^{(2)}_n (d) }, \quad d > 0,

where

U^{(1)}_n (d) = \frac{2}{n(n-1)} \sum_{1 \leq i < j \leq n} \frac{|X_i - X_j|}{X_i + X_j} 1(X_i + X_j > d),

U^{(2)}_n (d) = \frac{2}{n(n-1)} \sum_{1 \leq i < j \leq n} 1(X_i + X_j > d).

Confidence intervals for g(d), based on the following variance estimation methods, are also provided:

The (1-\gamma) confidence interval for \hat{g}_{n}(d) is given by:

\left[ \max\!\Bigl\{ \hat{g}_{n}(d)\;-\; z_{1 - \gamma/2} \,\frac{\hat{\sigma}_{d}}{ \sqrt{n\,U^{(2)}_{n}(d)} }, \;0 \Bigr\}, \;\; \min\!\Bigl\{ \hat{g}_{n}(d)\;+\; z_{1 - \gamma/2} \,\frac{\hat{\sigma}_{d}}{ \sqrt{n\,U^{(2)}_{n}(d)} }, \;1 \Bigr\} \right].

Here, z_{1 - \gamma/2} = \Phi^{-1}(1 - \tfrac{\gamma}{2}) is the appropriate quantile of the standard normal distribution and \hat{\sigma}_d is an estimator of the standard deviation based on one of the methods above.

Value

A matrix containing:

threshold

The value of the threshold d.

g.estimate

Estimate of g.

g.ci1

The lower bound of the confidence interval for g (if confint = TRUE).

g.ci2

The upper bound of the confidence interval for g (if confint = TRUE).

alpha

Estimate of the shape parameter under a gamma model.

alpha.ci1

The lower bound of the confidence interval for alpha (if confint = TRUE).

alpha.ci2

The upper bound of the confidence interval for alpha (if confint = TRUE).

References

Iwashita, T. & Klar, B. (2024). A gamma tail statistic and its asymptotics. Statistica Neerlandica 78:2, 264-280. doi:10.1111/stan.12316

Asmussen, S. & Lehtomaa, J. (2017). Distinguishing Log-Concavity from Heavy Tails. Risks 2017, 5, 10. doi:10.3390/risks5010010

Examples

x <- rgamma(100, shape = 2, scale = 1)
gamma_tail(x, d = 2, confint = FALSE, method = "unbiased", R = 1000)


[Package tailplots version 0.1.0 Index]