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'.
icendata(x, w=1)
is.icendata(x)
vector or matrix.
weights or multiplicities of the observations.
numeric vector, storing exact observations.
numeric vector, storing the weights of exact observations.
two-column numeric matrix, storing interval-censored observations.
numeric vector, storing the weights of interval-censored observations.
logical vector, indicating whether exact observations are
less than upper
.
the largest finite value of t
and o
.
numeric vector, containing 0 and all unique finite values in
t
and o
.
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\).
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).
# NOT RUN {
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