SpliceTB: Plot of fitted and Turnbull survival function In ReIns: Functions from "Reinsurance: Actuarial and Statistical Aspects"

Description

This function plots the fitted survival function of the spliced distribution together with the Turnbull survival function (which is suitable for interval censored data). Moreover, 100(1-α)\% confidence intervals are added.

Usage

 1 SpliceTB(x = sort(L), L, U = L, censored, splicefit, alpha = 0.05, ...)

Arguments

 x Vector of points to plot the functions at. By default we plot it at the points L. L Vector of length n with the lower boundaries of the intervals for interval censored data or the observed data for right censored data. U Vector of length n with the upper boundaries of the intervals. By default, they are equal to L. censored A logical vector of length n indicating if an observation is censored. splicefit A SpliceFit object, e.g. output from SpliceFiticPareto. alpha 100(1-α)\% is the confidence level for the confidence intervals. Default is α=0.05. ... Additional arguments for the plot function, see plot for more details.

Details

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 SpliceECDF for non-censored data.

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

Tom Reynkens

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

Examples

 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 ## 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)

Example output       sh: 1: cannot create /dev/null: Permission denied
sh: 1: wc: Permission denied

ReIns documentation built on July 2, 2020, 4:03 a.m.