Last chance! 50% off unlimited learning
Sale ends in
This function plots the logarithm of the Turnbull survival function (which is suitable for interval censored data) versus the logarithm of the data. Moreover, the logarithm of the fitted survival function of the spliced distribution is added.
SpliceLL_TB(x = sort(L), L, U = L, censored, splicefit, plot = TRUE,
main = "Splicing LL-plot", ...)
Vector of points to plot the fitted survival function at. By default we plot it at the points L
.
Vector of length
Vector of length L
.
A logical vector of length
A SpliceFit
object, e.g. output from SpliceFiticPareto
.
Logical indicating if the splicing LL-plot should be made, default is TRUE
.
Title for the plot, default is "Splicing LL-plot"
.
Additional arguments for the plot
function, see plot
for more details.
A list with following components:
Vector of the logarithms of the sorted left boundaries of the intervals.
Vector of the theoretical log-probabilities
Vector of the logarithms of the points to plot the fitted survival function at.
Vector of the empirical log-probabilities
The LL-plot consists of the points
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.
If the interval package is installed, the icfit
function is used to compute the Turnbull estimator. Otherwise, survfit.formula
from survival is used.
Use SpliceLL
for non-censored data.
See Reynkens et al. (2017) and Section 4.3.2 in Albrecher et al. (2017) for more details.
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
SpliceLL
, pSplice
, Turnbull
, icfit
, SpliceFiticPareto
, SpliceTB
, SplicePP_TB
, SpliceQQ_TB
# 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)
# }
Run the code above in your browser using DataLab