SpliceQQ_TB function

Splicing quantile plot using Turnbull estimator

Splicing quantile plot using Turnbull estimator

This function plots the fitted quantile function of the spliced distribution versus quantiles based on the Turnbull survival function (which is suitable for interval censored data).

SpliceQQ_TB(L, U = L, censored, splicefit, p = NULL, plot = TRUE, main = "Splicing QQ-plot", ...)

Arguments

  • L: Vector of length nn with the lower boundaries of the intervals for interval censored data or the observed data for right censored data.
  • U: Vector of length nn with the upper boundaries of the intervals. By default, they are equal to L.
  • censored: A logical vector of length nn indicating if an observation is censored.
  • splicefit: A SpliceFit object, e.g. output from SpliceFiticPareto.
  • p: Vector of probabilities used in the QQ-plot. If NULL, the default, we take p equal to 1/(n+1),...,n/(n+1).
  • plot: Logical indicating if the quantiles should be plotted in a splicing QQ-plot, default is TRUE.
  • main: Title for the plot, default is "Splicing QQ-plot".
  • ...: Additional arguments for the plot function, see plot for more details.

Details

This QQ-plot is given by

(Q(pj),Q^TB(pj)), (Q(p_j), \hat{Q}^{TB}(p_j)),

for j=1,,nj=1,\ldots,n where QQ is the quantile function of the fitted splicing model, Q^TB\hat{Q}^{TB} the quantile function obtained using the Turnbull estimator and pj=j/(n+1)p_j=j/(n+1).

If the interval package is installed, the icfit function is used to compute the Turnbull estimator. Otherwise, survfit.formula from survival is used.

Right censored data should be entered as L=l and U=truncupper, and left censored data should be entered as L=trunclower and U=u. The limits trunclower and truncupper are obtained from the SpliceFit object.

Use SpliceQQ for non-censored data.

See Reynkens et al. (2017) and Section 4.3.2 in Albrecher et al. (2017) for more details.

Returns

A list with following components: - sqq.the: Vector of the theoretical quantiles of the fitted spliced distribution.

  • sqq.emp: Vector of the empirical quantiles from the data (based on the Turnbull estimator).

References

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

Reynkens, T., Verbelen, R., Beirlant, J. and Antonio, K. (2017). "Modelling Censored Losses Using Splicing: a Global Fit Strategy With Mixed Erlang and Extreme Value Distributions". Insurance: Mathematics and Economics, 77, 65--77.

Verbelen, R., Gong, L., Antonio, K., Badescu, A. and Lin, S. (2015). "Fitting Mixtures of Erlangs to Censored and Truncated Data Using the EM Algorithm." Astin Bulletin, 45, 729--758

Author(s)

Tom Reynkens

See Also

SpliceQQ, qSplice, Turnbull, icfit, SpliceFiticPareto, SpliceTB, SplicePP_TB, SpliceLL_TB

Examples

## Not run: # Pareto random sample X <- rpareto(500, shape=2) # Censoring variable Y <- rpareto(500, shape=1) # Observed sample Z <- pmin(X,Y) # Censoring indicator censored <- (X>Y) # Right boundary U <- Z U[censored] <- Inf # Splice ME and Pareto splicefit <- SpliceFiticPareto(L=Z, U=U, censored=censored, tsplice=quantile(Z,0.9)) x <- seq(0,20,0.1) # Plot of spliced CDF plot(x, pSplice(x, splicefit), type="l", xlab="x", ylab="F(x)") # Plot of spliced PDF plot(x, dSplice(x, splicefit), type="l", xlab="x", ylab="f(x)") # Fitted survival function and Turnbull survival function SpliceTB(x, L=Z, U=U, censored=censored, splicefit=splicefit) # Log-log plot with Turnbull survival function and fitted survival function SpliceLL_TB(x, L=Z, U=U, censored=censored, splicefit=splicefit) # PP-plot of Turnbull survival function and fitted survival function SplicePP_TB(L=Z, U=U, censored=censored, splicefit=splicefit) # PP-plot of Turnbull survival function and # fitted survival function with log-scales SplicePP_TB(L=Z, U=U, censored=censored, splicefit=splicefit, log=TRUE) # QQ-plot using Turnbull survival function and fitted survival function SpliceQQ_TB(L=Z, U=U, censored=censored, splicefit=splicefit) ## End(Not run)
  • Maintainer: Tom Reynkens
  • License: GPL (>= 2)
  • Last published: 2024-12-02