| CSdataclean | R Documentation |
Given N current status data, order according to inspection times, and find the positions (in the ordered data) of the first 1 and last 0 of the delta.
CSdataclean(itime, delta)
itime |
The inspection times. Length N. |
delta |
Either 0 or 1. I[yi <= itimei]. Length N. |
When calculate NPMLE of the CDF F(t) from current status data, it is obvious that F(t) = 0 before the location (in itime) of first delta=1 occurance in the delta list, and similarly, F(t) = 1 after the last delta=0 occurance. So in the calculation of NPMLE we need only to consider estimating F(.) when time t is from itime[first] to itime[last].
We take the definition of NPMLE \hat F_n(t) as right continuous.
Usually, the current status data are stored in either long format or short format.
The short format is often used when there are many tied inspection times.
This function, CSdataclean, takes input of current status data in the long format:
itime=(t1, t2, ... tN) and delta=(0,1,... 1). The only values in the delta are 0 or 1.
If needed you can convert the short format to long format using function L2S.
It returns a list containing
itime |
The ordered inspection times. |
delta |
The delta, ordered according to itime. |
Istart |
delta[Istart] is the first 1 in the ordered delta output. |
Iend |
delta[Iend] is the last 0 in the ordered delta output. |
Mai Zhou <maizhou@gmail.com>.
Zhou, M. (2026). Empirical Likelihood Method in Survival Analysis 2nd Edition Chapman & Hall/CRC
y <- c(10, 209, 273, 279, 324, 391, 566, 785)
x <- c(21, 38, 39, 51, 77, 185, 240, 289, 524)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.