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.