icendata {npsurv} | R Documentation |
Class of Interval-censored Data
Description
Class icendata
can be used to store general
interval-censored data, which may possibly contain exact
observations.There are several functions associated with the
class.
Usage
icendata(x, w=1)
is.icendata(x)
Arguments
x |
vector or matrix. |
w |
weights or multiplicities of the observations. |
Details
Function icendata
creates an object of class 'icendata', which can be
used to save both interval-censored and exact observations.
Function is.icendata
simply checks if an object is of class
'icendata'.
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 endpoints in the first and
second column, respectively. If the left and right endpoints 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 endpoints 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 by other functions. 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.
An interval-valued observation is either (L_i, R_i]
if
L_i < R_i
, or [L_i, R_i]
if L_i =
R_i
.
Value
t |
numeric vector, storing exact observations. |
wt |
numeric vector, storing the weights of exact observations. |
o |
two-column numeric matrix, storing interval-censored observations. |
wo |
numeric vector, storing the weights of interval-censored observations. |
i1 |
logical vector, indicating whether exact observations are less
than |
upper |
the largest finite value of |
u |
numeric vector, containing 0 and all unique finite values in
|
Author(s)
Yong Wang <yongwang@auckland.ac.nz>
References
Wang, Y. (2008). Dimension-reduced nonparametric maximum likelihood computation for interval-censored data. Computational Statistics & Data Analysis, 52, 2388-2402.
Wang, Y. and Fani, S. (2017). Nonparametric maximum likelihood computation of a U-shaped hazard function. Statistics and Computing, (in print).
See Also
Examples
data(ap)
(x = icendata(ap))
is.icendata(x)
data(gastric)
icendata(gastric)
data(leukemia)
i = leukemia[,"group"] == "6-MP"
icendata(leukemia[i,1:2])