Computes estimates of large quantiles Q(1−p) using the estimates for the EVI obtained from the generalised Hill estimator adapted for right censoring.
cQuantGH(data, censored, gamma1, p, plot =FALSE, add =FALSE, main ="Estimates of extreme quantile",...)
Arguments
data: Vector of n observations.
censored: A logical vector of length n indicating if an observation is censored.
gamma1: Vector of n−1 estimates for the EVI obtained from cgenHill.
p: The exceedance probability of the quantile (we estimate Q(1−p) for p small).
plot: Logical indicating if the estimates should be plotted as a function of k, default is FALSE.
add: Logical indicating if the estimates should be added to an existing plot, default is FALSE.
main: Title for the plot, default is "Estimates of extreme quantile".
...: Additional arguments for the plot function, see plot for more details.
Details
The quantile is estimated as
Q^(1−p)=Zn−k,n+ak,n(((1−km)/p)γ^1−1)/γ^1)
with Zi,n the i-th order statistic of the data, γ^1 the generalised Hill estimator adapted for right censoring and km the Kaplan-Meier estimator for the CDF evaluated in Zn−k,n. The value a is defined as
ak,n=Zn−k,nHk,n(1−SZ,k,n)/p^k
with Hk,n the ordinary Hill estimator and p^k the proportion of the k largest observations that is non-censored, and
SZ,k,n=1−(1−M12/M2)(−1)/2
with
Ml==1/kj=1∑k(logXn−j+1,n−logXn−k,n)l.
Returns
A list with following components: - k: Vector of the values of the tail parameter k.
Q: Vector of the corresponding quantile estimates.
p: The used exceedance probability.
References
Einmahl, J.H.J., Fils-Villetard, A. and Guillou, A. (2008). "Statistics of Extremes Under Random Censoring." Bernoulli, 14, 207--227.
Author(s)
Tom Reynkens
See Also
cProbGH, cgenHill, QuantGH, Quant, KaplanMeier
Examples
# Set seedset.seed(29072016)# Pareto random sampleX <- rpareto(500, shape=2)# Censoring variableY <- rpareto(500, shape=1)# Observed sampleZ <- pmin(X, Y)# Censoring indicatorcensored <-(X>Y)# Generalised Hill estimator adapted for right censoringcghill <- cgenHill(Z, censored=censored, plot=TRUE)# Large quantilep <-10^(-4)cQuantGH(Z, gamma1=cghill$gamma, censored=censored, p=p, plot=TRUE)