crParetoQQ function

Conditional Pareto quantile plot for right censored data

Conditional Pareto quantile plot for right censored data

Conditional Pareto QQ-plot adapted for right censored data.

crParetoQQ(x, Xtilde, Ytilde, censored, h, kernel = c("biweight", "normal", "uniform", "triangular", "epanechnikov"), plot = TRUE, add = FALSE, main = "Pareto QQ-plot", type = "p", ...)

Arguments

  • x: Value of the conditioning variable XX at which to make the conditional Pareto QQ-plot.
  • Xtilde: Vector of length nn containing the censored sample of the conditioning variable XX.
  • Ytilde: Vector of length nn containing the censored sample of the variable YY.
  • censored: A logical vector of length nn indicating if an observation is censored.
  • h: Bandwidth of the non-parametric estimator for the conditional survival function (crSurv).
  • kernel: Kernel of the non-parametric estimator for the conditional survival function (crSurv). One of "biweight" (default), "normal", "uniform", "triangular" and "epanechnikov".
  • plot: Logical indicating if the quantiles should be plotted in a Pareto QQ-plot, default is TRUE.
  • add: Logical indicating if the quantiles should be added to an existing plot, default is FALSE.
  • main: Title for the plot, default is "Pareto QQ-plot".
  • type: Type of the plot, default is "p" meaning points are plotted, see plot for more details.
  • ...: Additional arguments for the plot function, see plot for more details.

Details

We construct a Pareto QQ-plot for YY conditional on X=xX=x using the censored sample (X~i,Y~i)(\tilde{X}_i, \tilde{Y}_i), for i=1,,ni=1,\ldots,n, where XX and YY are censored at the same time. We assume that YY and the censoring variable are conditionally independent given XX.

The conditional Pareto QQ-plot adapted for right censoring is given by

(log(1F^YX(Y~j,nx)),logY~j,n) ( -\log(1-\hat{F}_{Y|X}(\tilde{Y}_{j,n}|x)), \log \tilde{Y}_{j,n} )

for j=1,,n1,j=1,\ldots,n-1,

with Y~i,n\tilde{Y}_{i,n} the ii-th order statistic of the censored data and F^YX(yx)\hat{F}_{Y|X}(y|x) the non-parametric estimator for the conditional CDF of Akritas and Van Keilegom (2003), see crSurv.

See Section 4.4.3 in Albrecher et al. (2017) for more details.

Returns

A list with following components: - pqq.the: Vector of the theoretical quantiles, see Details.

  • pqq.emp: Vector of the empirical quantiles from the log-transformed YY data.

References

Akritas, M.G. and Van Keilegom, I. (2003). "Estimation of Bivariate and Marginal Distributions With Censored Data." Journal of the Royal Statistical Society: Series B, 65, 457--471.

Albrecher, H., Beirlant, J. and Teugels, J. (2017). Reinsurance: Actuarial and Statistical Aspects, Wiley, Chichester.

Author(s)

Tom Reynkens

See Also

crSurv, crHill, cParetoQQ

Examples

# Set seed set.seed(29072016) # Pareto random sample Y <- rpareto(200, shape=2) # Censoring variable C <- rpareto(200, shape=1) # Observed (censored) sample of variable Y Ytilde <- pmin(Y, C) # Censoring indicator censored <- (Y>C) # Conditioning variable X <- seq(1, 10, length.out=length(Y)) # Observed (censored) sample of conditioning variable Xtilde <- X Xtilde[censored] <- X[censored] - runif(sum(censored), 0, 1) # Conditional Pareto QQ-plot crParetoQQ(x=1, Xtilde=Xtilde, Ytilde=Ytilde, censored=censored, h=2) # Plot Hill-type estimates crHill(x=1, Xtilde, Ytilde, censored, h=2, plot=TRUE)
  • Maintainer: Tom Reynkens
  • License: GPL (>= 2)
  • Last published: 2024-12-02