View source: R/IntervalCensoring.R
MeanExcess_TB | R Documentation |
Computes mean excess values using the Turnbull estimator. These mean excess values can then be plotted as a function of the empirical quantiles (computed using the Turnbull estimator) or as a function of the tail parameter k
.
MeanExcess_TB(L, U = L, censored, trunclower = 0, truncupper = Inf,
plot = TRUE, k = FALSE, intervalpkg = TRUE,
main = "Mean excess plot", ...)
L |
Vector of length |
U |
Vector of length |
censored |
A logical vector of length |
trunclower |
Lower truncation point, default is 0. |
truncupper |
Upper truncation point, default is |
plot |
Logical indicating if the mean excess values should be plotted in a mean excess plot, default is |
k |
Logical indicating if the mean excess values are plotted as a function of the tail parameter |
intervalpkg |
Logical indicating if the Turnbull estimator is computed using the implementation in the interval package if this package is installed. Default is |
main |
Title for the plot, default is |
... |
Additional arguments for the |
The mean excess values are given by
\hat{e}^{TB}(v)=(\int_v^{\infty} 1-\hat{F}^{TB}(u) du)/(1-\hat{F}^{TB}(v))
where \hat{F}^{TB}
is the Turnbull estimator for the CDF.
More specifically, we use the values v=\hat{Q}^{TB}(p)
for p=1/(n+1), \ldots, (n-1)/(n+1)
where
\hat{Q}^{TB}(p)
is the empirical quantile function corresponding to the Turnbull estimator.
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
.
If the interval package is installed and intervalpkg=TRUE
, the icfit
function is used to compute the Turnbull estimator. Otherwise, survfit.formula
from survival is used.
Use MeanExcess
for non-censored data.
See Section 4.3 in Albrecher et al. (2017) for more details.
A list with following components:
k |
Vector of the values of the tail parameter |
X |
Vector of the empirical quantiles, computed using the Turnbull estimator, corresponding to |
e |
Vector of the mean excess values corresponding to the tail parameters in |
Tom Reynkens
Albrecher, H., Beirlant, J. and Teugels, J. (2017). Reinsurance: Actuarial and Statistical Aspects, Wiley, Chichester.
MeanExcess
, Turnbull
, icfit
# 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
# Mean excess plot
MeanExcess_TB(Z, U, censored, k=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.