x: Vector of points to evaluate the CDF or PDF in.
p: Vector of probabilities.
n: Number of observations.
splicefit: A SpliceFit object, e.g. output from SpliceFitPareto, SpliceFiticPareto or SpliceFitGPD.
log: Logical indicating if the densities are given as log(f), default is FALSE.
lower.tail: Logical indicating if the probabilities are of the form P(X≤x) (TRUE) or P(X>x) (FALSE). Default is TRUE.
log.p: Logical indicating if the probabilities are given as log(p), default is FALSE.
Details
See Reynkens et al. (2017) and Section 4.3 in Albrecher et al. (2017) for details.
Returns
dSplice gives the density function evaluated in x, pSplice the CDF evaluated in x and qSplice the quantile function evaluated in p. The length of the result is equal to the length of x or p.
rSplice returns a random sample of length n.
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 with R code from Roel Verbelen for the mixed Erlang PDF, CDF and quantiles.
See Also
VaR, SpliceFit, SpliceFitPareto, SpliceFiticPareto, SpliceFitGPD, SpliceECDF, SpliceLL, SplicePP
Examples
## Not run:# Pareto random sampleX <- rpareto(1000, shape =2)# Splice ME and Paretosplicefit <- SpliceFitPareto(X,0.6)x <- seq(0,20,0.01)# Plot of spliced CDFplot(x, pSplice(x, splicefit), type="l", xlab="x", ylab="F(x)")# Plot of spliced PDFplot(x, dSplice(x, splicefit), type="l", xlab="x", ylab="f(x)")p <- seq(0,1,0.01)# Plot of splicing quantilesplot(p, qSplice(p, splicefit), type="l", xlab="p", ylab="Q(p)")# Plot of VaRplot(p, VaR(p, splicefit), type="l", xlab="p", ylab=bquote(VaR[p]))# Random sample from spliced distributionx <- rSplice(1000, splicefit)## End(Not run)