Last chance! 50% off unlimited learning
Sale ends in
Density, distribution function, quantile function and random generation for the fitted spliced distribution.
dSplice(x, splicefit, log = FALSE)pSplice(x, splicefit, lower.tail = TRUE, log.p = FALSE)
qSplice(p, splicefit, lower.tail = TRUE, log.p = FALSE)
rSplice(n, splicefit)
Vector of points to evaluate the CDF or PDF in.
Vector of probabilities.
Number of observations.
A SpliceFit
object, e.g. output from SpliceFitPareto
, SpliceFiticPareto
or SpliceFitGPD
.
Logical indicating if the densities are given as FALSE
.
Logical indicating if the probabilities are of the form TRUE
) or FALSE
). Default is TRUE.
Logical indicating if the probabilities are given as FALSE
.
dSplice
gives the density function evaluated in pSplice
the CDF evaluated in qSplice
the quantile function evaluated in
rSplice
returns a random sample of length
See Reynkens et al. (2017) and Section 4.3 in Albrecher et al. (2017) for 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.
VaR
, SpliceFit
, SpliceFitPareto
, SpliceFiticPareto
, SpliceFitGPD
,
SpliceECDF
, SpliceLL
, SplicePP
# 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)")
p <- seq(0, 1, 0.01)
# Plot of splicing quantiles
plot(p, qSplice(p, splicefit), type="l", xlab="p", ylab="Q(p)")
# Plot of VaR
plot(p, VaR(p, splicefit), type="l", xlab="p", ylab=bquote(VaR[p]))
# Random sample from spliced distribution
x <- rSplice(1000, splicefit)
# }
Run the code above in your browser using DataLab