CSdataclean: Order the Given Current Status Data and Output with Some...

View source: R/CSdataclean.R

CSdatacleanR Documentation

Order the Given Current Status Data and Output with Some Additional Information

Description

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.

Usage

CSdataclean(itime, delta) 

Arguments

itime

The inspection times. Length N.

delta

Either 0 or 1. I[yi <= itimei]. Length N.

Details

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.

Value

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.

Author(s)

Mai Zhou <maizhou@gmail.com>.

References

Zhou, M. (2026). Empirical Likelihood Method in Survival Analysis 2nd Edition Chapman & Hall/CRC

Examples

 
y <- c(10, 209, 273, 279, 324, 391, 566, 785)
x <- c(21, 38, 39, 51, 77, 185, 240, 289, 524)

emplikCS documentation built on June 21, 2026, 1:07 a.m.