ReIns (version 1.0.10)

SplicePP: PP-plot with fitted and empirical survival function

Description

This function plots the fitted survival function of the spliced distribution versus the empirical survival function (determined using the Empirical CDF (ECDF)).

Usage

SplicePP(X, splicefit, x = sort(X), log = FALSE, plot = TRUE, 
         main = "Splicing PP-plot", ...)

Value

A list with following components:

spp.the

Vector of the theoretical probabilities \(1-\hat{F}_{spliced}(x_{i,n})\) (when log=FALSE) or \(-\log(1-\hat{F}_{spliced}(x_{i,n}))\) (when log=TRUE).

spp.emp

Vector of the empirical probabilities \(1-\hat{F}(x_{i,n})\) (when log=FALSE) or \(-\log(1-\hat{F}(x_{i,n}))\) (when log=TRUE).

Arguments

X

Data used for fitting the distribution.

splicefit

A SpliceFit object, e.g. output from SpliceFitPareto or SpliceFitGPD.

x

Vector of points to plot the functions at. By default we plot them at the data points.

log

Logical indicating if minus the logarithms of the survival probabilities are plotted versus each other, default is FALSE.

plot

Logical indicating if the splicing PP-plot should be made, default is TRUE.

main

Title for the plot, default is "Splicing PP-plot".

...

Additional arguments for the plot function, see plot for more details.

Author

Tom Reynkens

Details

The PP-plot consists of the points $$(1-\hat{F}(x_{i,n}), 1-\hat{F}_{spliced}(x_{i,n})))$$ for \(i=1,\ldots,n\) with \(n\) the length of the data, \(x_{i,n}\) the \(i\)-th smallest observation, \(\hat{F}\) the empirical distribution function and \(\hat{F}_{spliced}\) the fitted spliced distribution function. The minus-log version of the PP-plot consists of $$(-\log(1-\hat{F}(x_{i,n})), -\log(1-\hat{F}_{spliced}(x_{i,n})))).$$

Use SplicePP_TB for censored data.

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

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

See Also

SplicePP_TB, pSplice, ecdf, SpliceFitPareto, SpliceFitGPD, SpliceECDF, SpliceLL, SpliceQQ

Examples

Run this code
if (FALSE) {

# Pareto random sample
X <- rpareto(1000, shape = 2)

# Splice ME and Pareto
splicefit <- SpliceFitPareto(X, 0.6)



x <- seq(0, 20, 0.01)

# 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 empirical survival function 
SpliceECDF(x, X, splicefit)

# Log-log plot with empirical survival function and fitted survival function
SpliceLL(x, X, splicefit)

# PP-plot of empirical survival function and fitted survival function
SplicePP(X, splicefit)

# PP-plot of empirical survival function and 
# fitted survival function with log-scales
SplicePP(X, splicefit, log=TRUE)

# Splicing QQ-plot
SpliceQQ(X, splicefit)
}

Run the code above in your browser using DataLab