## S3 method for class 'formula':
icfit(formula, data, \dots)
## S3 method for class 'default':
icfit(L, R,initfit = NULL, control=icfitControl(), Lin=NULL, Rin=NULL, ...)icfitControl)icfit (same as icsurv class, see details).
A list with elements:icfit function fits the nonparametric maximum likelihood estimate (NPMLE) of the
distribution function for interval censored data. In the default case (when Lin=Rin=NULL)
we assume there are n (n=length(L)) failure times, and the ith one is in the interval
between L[i] and R[i]. The default is not to include L[i] in the interval unless L[i]=R[i],
and to include R[i] in the interval unless R[i]=Inf. When Lin and Rin are not NULL they describe
whether to include L and R in the associated interval. If either Lin or Rin is length 1 then it is
repeated n times, otherwise they should be logicals of length n.
The algorithm is basically an EM-algorithm applied to
interval censored data (see Turnbull, 1976); however
first there is a primary reduction (see Aragon and
Eberly, 1992). Convergence is defined when the maximum
reduced gradient is less than epsilon (see icfitControl), and the
Kuhn-Tucker conditions are approximately met,
otherwise a warning will result. (see Gentleman and
Geyer, 1994). There are other faster algorithms (for example see
EMICM in the package
Icens.
The output is of class icfit which is identical to the icsurv class of the
Icens package when there is only one group for which a distribution is needed.
Following that class, there is an intmap element which gives the bounds
about which each drop in the NPMLE survival function can occur.
Since the classes icfit and icsurv are so closely related, one can directly
use of initial (and faster) fits from the Icens package as input in
initfit. Note that when using a non-null initfit, the Lin and Rin values of the
initial fit are ignored. The advantage of the icfit function is that it allows a call similar
to that used in survfit of the survival package so that different groups may be
plotted at the same time with similar calls.
An icfit object prints as a list (see value below). A print function prints output as a list
except suppresses printing of A matrix. A summary function prints the
distribution (i.e., probabilities and the intervals where those
probability masses are known to reside) for each group in the icfit object. There is also
a plot method, see plot.icfit.ictestdata(bcos)
icout<-icfit(Surv(left,right,type="interval2")~treatment, data=bcos)
plot(icout)
## can pick out just one group
plot(icout[1])Run the code above in your browser using DataLab