Learn R Programming

npsurv (version 0.3-3)

icendata: Class of Interval-censored Data

Description

Function icendata creates an object of class 'icendata', which can save interval-censored and exact observations.

Function is.icendata simply checks if an object is of class 'icendata'.

Usage

icendata(x, w=1)
 is.icendata(x)

Arguments

x
vector or matrix.
w
weights or multiplicities of the observations.

Value

  • tnumeric vector, storing exact observations.
  • wtnumeric vector, storing the weights of exact observations.
  • otwo-column numeric matrix, storing interval-censored observations.
  • wonumeric vector, storing the weights of interval-censored observations.
  • i1logical vector, indicating whether exact observations are less than upper.
  • upperthe largest finite value of t and o.
  • unumeric vector, containing 0 and all unique finite values in t and o.

Details

If x is a vector, it contains only exact observations, with weights given in w.

If x is a two-column matrix, it contains interval-censored observations and stores their left and right end-points in the first and second column, respectively. If the left and right end-points are equal, then the observation is exact. Weights are provided by w.

If x is a three-column matrix, it contains interval-censored observations and stores their left and right end-points in the first and second column, respectively. The weight of each observation is the third-column value multiplied by the corresponding weight value in w.

It is useful to turn interval-censored (and exact) observations into the format imposed by icendata so that they can be processed in a standardized format. Also, exact and interval-censored observations are stored separately in this format and can hence be dealt with more easily. Most functions in the package npsurv first ensure that the data has this format before processing.

Observations of zero weights are removed. Identical observations are aggregated.

References

Wang, Y. (2008). Dimension-reduced nonparametric maximum likelihood computation for interval-censored data. Computational Statistics & Data Analysis, 52, 2388-2402.

Wang, Y. and S. Fani (2015). Nonparametric maximum likelihood computation of a U-shaped hazard function. (In Preparation).

See Also

npsurv, Uhaz.

Examples

Run this code
data(ap)
(x = icendata(ap))
is.icendata(x)

data(gastric)
icendata(gastric)

data(leukemia)
i = leukemia[,"group"] == "6-MP"
icendata(leukemia[i,1:2])

Run the code above in your browser using DataLab