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'.
icendata(x, w=1)
is.icendata(x)
upper
.t
and o
.t
and o
.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.
Wang, Y. and S. Fani (2015). Nonparametric maximum likelihood computation of a U-shaped hazard function. (In Preparation).
npsurv
, Uhaz
.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