This is the local KM estimator customized for this library to run in batch mode. It returns the estimated conditional survival probabilities given a user specified set of covariate names that the survival time depends on, a.k.a F(T>y0∣x0).
More specifically, for uncensored data points, we return (1 - tauhat_func()). If the observed data point is censored, then this function returns value -1 as a flag meaning we cannot .
LocalKM(D, bw, NamesCov)
Arguments
D: a data.frame with column censor_y, column delta, and additional covaraites.
bw: the bandwidth parameter
NamesCov: the vector of column names in data.frame D such that the survival time depends on.
Returns
A vector of estimated conditional survival probability evaluated at the observed actual survival time on the same individual