SpliceECDF: Plot of fitted and empirical survival function

Description Usage Arguments Details Author(s) References See Also Examples

View source: R/Splicing_plots.R

Description

This function plots the fitted survival function of the spliced distribution together with the empirical survival function (determined using the Empirical CDF (ECDF)). Moreover, 100(1-α)\% confidence bands are added.

Usage

1
SpliceECDF(x, X, splicefit, alpha = 0.05, ...)

Arguments

x

Vector of points to plot the functions at.

X

Data used for fitting the distribution.

splicefit

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

alpha

100(1-α)\% is the confidence level for the confidence bands. Default is α=0.05.

...

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

Details

Use SpliceTB for censored data.

Confidence bands are determined using the Dvoretzky-Kiefer-Wolfowitz inequality (Massart, 1990).

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

Author(s)

Tom Reynkens

References

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

Massart, P. (1990). The Tight Constant in the Dvoretzky-Kiefer-Wolfowitz Inequality. Annals of Probability, 18, 1269–1283.

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

SpliceTB, pSplice, ecdf, SpliceFitPareto, SpliceFitGPD, SpliceLL, SplicePP, SpliceQQ

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
## Not run: 

# 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)

## End(Not run)

Example output

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

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