HypoTesting {ExtremeRisks} R Documentation

## Wald-Type Hypothesis Testing

### Description

Wald-type hypothesis tes for testing equality of high or extreme expectiles and quantiles

### Usage

HypoTesting(data, tau, tau1=NULL, type="ExpectRisks", level="extreme",
method="LAWS", bias=FALSE, k=NULL, alpha=0.05)


### Arguments

 data A matrix of (n \times d) observations. tau A real in (0,1) specifying the intermediate level \tau_n. See Details. tau1 A real in (0,1) specifying the extreme level \tau'_n. See Details. type A string specifying the type of test. By default type="ExpectRisks" specifies the test for testing the equality of expectiles. See Details. level A string specifying the level of the expectile. This make sense when type="ExpectRisks". By default level="extreme" specifies that the test concerns expectiles at the extreme level. See Details. method A string specifying the method used to estimate the expecile. By default est="LAWS" specifies the use of the LAWS based estimator. See Details. bias A logical value. By default bias=FALSE specifies that no bias correction is computed. See Details. k An integer specifying the value of the intermediate sequence k_n. See Details. alpha A real in (0,1) specifying the significance level of the test.

### Details

With a dataset data of d-dimensional observations and sample size n, a Wald-type hypothesis testing is performed in order to check whether the is empirical evidence against the null hypothesis. The null hypothesis concerns the equality among the expectiles or quantiles or tail indices of the marginal distributions. The three tests depend on the depends on the estimation of the d-dimensional tail index \gamma. Here, \gamma is estimated using the Hill estimation (see MultiHTailIndex for details). The data are regarded as d-dimensional temporal independent observations coming from dependent variables. See Padoan and Stupfler (2020) for details.

• The so-called intermediate level tau or \tau_n is a sequence of positive reals such that \tau_n \to 1 as n \to \infty. Practically, for each marginal distribution, \tau_n \in (0,1) is the ratio between N (Numerator) and D (Denominator). Where N is the empirical mean distance of the \tau_n-th expectile from the observations smaller than it, and D is the empirical mean distance of \tau_n-th expectile from all the observations.

• The so-called extreme level tau1 or \tau'_n is a sequence of positive reals such that \tau'_n \to 1 as n \to \infty. For each marginal distribution, the value (1-tau'_n) \in (0,1) is meant to be a small tail probability such that (1-\tau'_n)=1/n or (1-\tau'_n) < 1/n. It is also assumed that n(1-\tau'_n) \to C as n \to \infty, where C is a positive finite constant. Typically, C \in (0,1) so it is expected that there are no observations in a data sample that are greater than the expectile at the extreme level \tau_n'.

• When type="ExpectRisks", the null hypothesis of the hypothesis testing concerns the equality among the expectiles of the marginal distributions. See Section 3.3 of Padoan and Stupfler (2020) for details. When type="QuantRisks", the null hypothesis of the hypothesis testing concerns the equality among the quantiles of the marginal distributions. See Section 5 of Padoan and Stupfler (2020) for details. Note that in this case the test is based on the asymptotic distribution of normalized quantile estimator in the logarithmic scale. When type="tails", the null hypothesis of the hypothesis testing concerns the equality among the tail indices of the marginal distributions. See Sections 3.2 and 3.3 of Padoan and Stupfler (2020) for details.

• When type="ExpectRisks", the null hypothesis concerns the equality among the expectiles of the marginal distributions at the intermediate level and this is achieved through level=="inter". In this case the test is obtained exploiting the asymptotic distribution of relative expectile appropriately normalised. See Section 2.1, 3.1 and 3.3 of Padoan and Stupfler (2020) for details. Instead, if level=="extreme" the null hypothesis concerns the equality among the expectiles of the marginal distributions at the extreme level.

• When method='LAWS', then the \tau'_n-th d-dimensional expectile is estimated using the LAWS based estimator. When method='QB', the expectile is instead estimated using the QB esimtator. The definition of both estimators depend on the estimation of the d-dimensional tail index \gamma. The d-dimensional tail index \gamma is estimated using the d-dimensional Hill estimator (tailest='Hill'), see MultiHTailIndex). See Section 2.2 in Padoan and Stupfler (2020) for details.

• If bias=TRUE then d-dimensional \gamma is estimated using formula (4.2) of Haan et al. (2016). This is used by the LAWS and QB estimators. Furthermore, the \tau'_nth quantile is estimated using the formula in page 330 of de Haan et al. (2016). This provides a bias corrected version of the Weissman estimator. This is used by the QB estimator. However, in this case the asymptotic variance is not estimated using the formula in Haan et al. (2016) Theorem 4.2. Instead, for simplicity the asymptotic variance-covariance matrix is estimated by the formulas Section 3.2 of Padoan and Stupfler (2020).

• k or k_n is the value of the so-called intermediate sequence k_n, n=1,2,\ldots. Its represents a sequence of positive integers such that k_n \to \infty and k_n/n \to 0 as n \to \infty. Practically, for each marginal distribution when tau=NULL and method='LAWS' or method='QB', then \tau_n=1-k_n/n is the intermediate level of the expectile to be stimated. When tailest='Hill', for each marginal distributions, then k_n specifies the number of k+1 larger order statistics used in the definition of the Hill estimator.

• A small value \alpha\in (0,1) specifies the significance level of Wald-type hypothesis testing.

### Value

A list with elements:

• logLikR: the observed value of log-likelihood ratio statistic test;

• critVal: the quantile (critical level) of a chi-square distribution with d degrees of freedom and confidence level \alpha.

### References

Padoan A.S. and Stupfler, G. (2020). Joint inference on extreme expectiles for multivariate heavy-tailed distributions. arXiv e-prints arXiv:2007.08944, https://arxiv.org/abs/2007.08944

### Examples

# Hypothesis testing on the equality extreme expectiles based on a sample of
# d-dimensional observations simulated from a joint distribution with
# a Gumbel copula and equal Frechet marginal distributions.
library(plot3D)
library(copula)
library(evd)

# distributional setting
copula <- "Gumbel"
dist <- "Frechet"

# parameter setting
dep <- 3
dim <- 3
scale <- rep(1, dim)
shape <- rep(3, dim)
par <- list(dep=dep, scale=scale, shape=shape, dim=dim)

# Intermediate level (or sample tail probability 1-tau)
tau <- 0.95
# Extreme level (or tail probability 1-tau1 of unobserved expectile)
tau1 <- 0.9995

# sample size
ndata <- 1000

# Simulates a sample from a multivariate distribution with equal Frechet
# marginals distributions and a Gumbel copula
data <- rmdata(ndata, dist, copula, par)
scatter3D(data[,1], data[,2], data[,3])

# Performs Wald-type hypothesis testing
HypoTesting(data, tau, tau1)

# Hypothesis testing on the equality extreme expectiles based on a sample of
# d-dimensional observations simulated from a joint distribution with
# a Clayton copula and different Frechet marginal distributions.

# distributional setting
copula <- "Clayton"
dist <- "Frechet"

# parameter setting
dim <- 3
dep <- 2
scale <- rep(1, dim)
shape <- c(2.1, 3, 4.5)
par <- list(dep=dep, scale=scale, shape=shape, dim=dim)

# Intermediate level (or sample tail probability 1-tau)
tau <- 0.95
# Extreme level (or tail probability 1-tau1 of unobserved expectile)
tau1 <- 0.9995

# sample size
ndata <- 1000

# Simulates a sample from a multivariate distribution with equal Frechet
# marginals distributions and a Gumbel copula
data <- rmdata(ndata, dist, copula, par)
scatter3D(data[,1], data[,2], data[,3])

# Performs Wald-type hypothesis testing
HypoTesting(data, tau, tau1)


[Package ExtremeRisks version 0.0.4 Index]