kmc.clean {kmc} | R Documentation |
Perform Data Clean for the kmc Algorithm
Description
The kmc.clean function clean the (kmc.time, delta) for the randomized censored data:
- Reorder the data according to the observed time and status;
- Clean the (right) censored data point(s) if they happen before the first uncesored data.
- If there are ties in the data. For the time points contain ties, e.g.
(T_{i_s}, d_{i_s}), i_s \in S \forall j \in S, T_{j} \equiv T
, we re-arranged the data in a manner that those with d=1 are ordered ahead of those with d=0. As d=0 indicates the data point is right censored, such procedure is trivial.
Usage
kmc.clean(kmc.time, delta)
Arguments
kmc.time |
Non-negative real vector. The observed time. |
delta |
0/1 vector. Censoring status indictator, 0: right censored; 1 uncensored |
Value
A list with the following components:
kmc.time |
The cleaned observed time. |
delta |
The cleaned censoring status indictator, 0: right censored; 1 uncensored |
Author(s)
Yifan Yang(yfyang.86@hotmail.com)
References
Zhou, M. and Yang, Y. (2015). A recursive formula for the Kaplan-Meier estimator with mean constraints and its application to empirical likelihood Computational Statistics Online ISSN 1613-9658.
Examples
x <- c( 1, 1.5, 2, 3, 4.2, 5.0, 6.1, 5.3, 4.5, 0.9, 2.1, 4.3)
d <- c( 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1)
kmc.clean(x, d)