crSurv {ReIns} | R Documentation |
Non-parametric estimator of conditional survival function
Description
Non-parametric estimator of the conditional survival function of given
for censored data, see Akritas and Van Keilegom (2003).
Usage
crSurv(x, y, Xtilde, Ytilde, censored, h,
kernel = c("biweight", "normal", "uniform", "triangular", "epanechnikov"))
Arguments
x |
The value of the conditioning variable |
y |
The value(s) of the variable |
Xtilde |
Vector of length |
Ytilde |
Vector of length |
censored |
A logical vector of length |
h |
Bandwidth of the non-parametric estimator. |
kernel |
Kernel of the non-parametric estimator. One of |
Details
We estimate the conditional survival function
using the censored sample , for
, where
and
are censored at the same time. We assume that
and the censoring variable are conditionally independent given
.
The estimator is given by
where when
is censored and 0 otherwise. The weights are given by
when and 0 otherwise.
See Section 4.4.3 in Albrecher et al. (2017) for more details.
Value
Estimates for as described above.
Author(s)
Tom Reynkens
References
Akritas, M.G. and Van Keilegom, I. (2003). "Estimation of Bivariate and Marginal Distributions With Censored Data." Journal of the Royal Statistical Society: Series B, 65, 457–471.
Albrecher, H., Beirlant, J. and Teugels, J. (2017). Reinsurance: Actuarial and Statistical Aspects, Wiley, Chichester.
See Also
Examples
# Set seed
set.seed(29072016)
# Pareto random sample
Y <- rpareto(200, shape=2)
# Censoring variable
C <- rpareto(200, shape=1)
# Observed (censored) sample of variable Y
Ytilde <- pmin(Y, C)
# Censoring indicator
censored <- (Y>C)
# Conditioning variable
X <- seq(1, 10, length.out=length(Y))
# Observed (censored) sample of conditioning variable
Xtilde <- X
Xtilde[censored] <- X[censored] - runif(sum(censored), 0, 1)
# Plot estimates of the conditional survival function
x <- 5
y <- seq(0, 5, 1/100)
plot(y, crSurv(x, y, Xtilde=Xtilde, Ytilde=Ytilde, censored=censored, h=5), type="l",
xlab="y", ylab="Conditional survival function")