Learn R Programming

emplikCS (version 0.2)

CSdataclean: 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)

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.

Arguments

itime

The inspection times. Length N.

delta

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

Author

Mai Zhou <maizhou@gmail.com>.

Details

When calculate NPMLE of the CDF F(t) from current status data, it is obvious that F(t) = 0 before the location (itime) of first delta=1 occur in the delta list, and similarly, F(t) = 1 (one position) after the last delta=0 occur. So in the calculation of NPMLE we need only to consider 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 the current status data in the long form: itime=(t1, t2, ... tN) and delta=(0,1,... 1). The only values in the delta are 0 or 1.

References

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

Examples

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

Run the code above in your browser using DataLab