hill.ts {extremefit} R Documentation

## Compute the extreme quantile procedure on a time dependent data

### Description

Compute the function hill.adapt on time dependent data.

### Usage

```hill.ts(X, t, Tgrid = seq(min(t), max(t), length = 10), h,
kernel = TruncGauss.kernel, kpar = NULL, CritVal = 3.6,
gridlen = 100, initprop = 1/10, r1 = 1/4, r2 = 1/20)

## S3 method for class 'hill.ts'
print(x, ...)
```

### Arguments

 `X` a vector of the observed values. `t` a vector of time covariates which should have the same length as X. `Tgrid` a grid of time (can be any sequence in the interval `[min(t) , max(t)]` ). `h` a bandwidth value (vector values are not admitted). `kernel` a kernel function used to compute the weights in the time domain, with default the truncated Gaussian kernel. `kpar` a value for the kernel function parameter, with no default value. `CritVal` a critical value associated to the kernel function given by `CriticalValue`. The default value is 3.6 corresponding to the truncated Gaussian kernel. `gridlen` the gridlen parameter used in the function hill.adapt. The length of the grid for which the test will be done. `initprop` the initprop parameter used in the function hill.adapt. The initial proportion at which we will begin to test the model. `r1` the r1 parameter used in the function hill.adapt. The proportion from the right that we will skip in the test statistic. `r2` the r2 parameter used in the function hill.adapt. The proportion from the left that we will skip in the test statistic. `x` the result of the hill.ts function `...` further arguments to be passed from or to other methods.

### Details

For a given time serie and kernel function, the function hill.ts will give the results of the adaptive procedure for each t. The adaptive procedure is described in Durrieu et al. (2005).

The kernel implemented in this packages are : Biweight kernel, Epanechnikov kernel, Rectangular kernel, Triangular kernel and the truncated Gaussian kernel.

### Value

 `Tgrid` the given vector Tgrid. `h` the given value h. `Threshold` the adaptive threshold τ for each t in Tgrid. `Theta` the adaptive estimator of θ for each t in Tgrid.

### References

Durrieu, G. and Grama, I. and Pham, Q. and Tricot, J.- M (2015). Nonparametric adaptive estimator of extreme conditional tail probabilities quantiles. Extremes, 18, 437-478.

Durrieu, G. and Grama, I. and Jaunatre, K. and Pham, Q.-K. and Tricot, J.-M. (2018). extremefit: A Package for Extreme Quantiles. Journal of Statistical Software, 87, 1–20.

`hill.adapt`, `Biweight.kernel`, `Epa.kernel`, `Rectangular.kernel`, `Triang.kernel`, `TruncGauss.kernel`

### Examples

```
theta <- function(t){
0.5+0.25*sin(2*pi*t)
}
n <- 5000
t <- 1:n/n
Theta <- theta(t)
Data <- NULL
Tgrid <- seq(0.01, 0.99, 0.01)
#example with fixed bandwidth
## Not run:  #For computing time purpose
for(i in 1:n){
Data[i] <- rparetomix(1, a = 1/Theta[i], b = 5/Theta[i]+5, c = 0.75, precision = 10^(-5))
}

#example
hgrid <- bandwidth.grid(0.009, 0.2, 20, type = "geometric")
TgridCV <- seq(0.01, 0.99, 0.1)
hcv <- bandwidth.CV(Data, t, TgridCV, hgrid, pcv = 0.99, TruncGauss.kernel,
kpar = c(sigma = 1), CritVal = 3.6, plot = TRUE)

Tgrid <- seq(0.01, 0.99, 0.01)
hillTs <- hill.ts(Data, t, Tgrid, h = hcv\$h.cv, kernel = TruncGauss.kernel,
kpar = c(sigma = 1), CritVal = 3.6,gridlen = 100, initprop = 1/10, r1 = 1/4, r2 = 1/20)
plot(hillTs\$Tgrid, hillTs\$Theta, xlab = "t", ylab = "Estimator of theta")
lines(t, Theta, col = "red")

## End(Not run)

```

[Package extremefit version 1.0.2 Index]