S2L: Convert the Current Status Data from Short Format to Long...

View source: R/S2L.R

S2LR Documentation

Convert the Current Status Data from Short Format to Long Format

Description

Given current status data in short format (three vectors), convert it to the long format (one vector of inspection times, another vector=I[Yi <= ti]). We assume the input is ordered according to inspection times itime.

Usage

S2L(itime, fi, ni, OneFirst=TRUE) 

Arguments

itime

The unique inspection times. Tie removed. Length k.

fi

Frequency of 1's in the delta. Definition is I[yi <= itimei]. Length k.

ni

Frequency of inspection times ti tied at this value. Length k.

OneFirst

In the output of long format data, within the same inspection times, delta=1's comes before 0's. Default to TRUE.

Details

Same data set of 850 cases Hepatitis A tests from Bulgaria recorded in long format hepABulg in the R package csci compare to the short format hepatitisA in the R package curstatCI.

This function (and the sister function S2L) can be used to convert between the short and long format.

Value

It returns a list containing

Litime

The ordered inspection times. Long format.

delta

This is I[Yi <= ti].

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.

Related to S2L in emplikCS...