cd.uncured {sicure}R Documentation

Cross-validation conditional density of the susceptible population

Description

This function implements a nonparametric cross-validation estimator for the conditional density of the susceptible population, as proposed by Piñeiro-Lamas (2024) (see Equation (3.5)). A leave-one-out cross-validation approach is considered to ensure that the sample used to construct the estimator and the point at which it is evaluated are independent.

Usage

cd.uncured(x, time, delta, logh3, logh4)

Arguments

x

A numeric vector giving the covariate values.

time

A numeric vector giving the observed times.

delta

A numeric vector giving the values of the uncensoring indicator, where 1 indicates that the event of interest has been observed and 0 indicates that the observation is censored.

logh3

The logarithm of the bandwidth for smoothing the time variable.

logh4

The logarithm of the bandwidth for smoothing the covariate.

Value

A vector containing the cross-validation conditional density of the susceptible population for each observation (X_i, T_i).

References

Piñeiro-Lamas, B. (2024). High dimensional single-index mixture cure models [PhD thesis]. Universidade da Coruña. Available at https://ruc.udc.es/dspace/handle/2183/37035

See Also

cd.sm.uncured

Examples

# Some artificial data
set.seed(123)
n <- 50
x <- runif(n, -2, 2) # Covariate values
y <- rweibull(n, shape = 0.5 * (x + 4)) # True lifetimes
c <- rexp(n) # Censoring values
p <- exp(2*x)/(1 + exp(2*x)) # Probability of being susceptible
u <- runif(n)
t  <- ifelse(u < p, pmin(y, c), c) # Observed times
d  <- ifelse(u < p, ifelse(y < c, 1, 0), 0) # Uncensoring indicator
data <- data.frame(x = x, t = t, d = d)
suppressWarnings(cd.uncured(x, t, d, log(0.5), log(0.5)))

[Package sicure version 0.1.1 Index]