Learn R Programming

interval (version 0.9-9.6)

initcomputeMLE: functions to calculate initial NPMLE of the distribution

Description

The function icfit calculates the NPMLE of a distribution for interval censored data using an E-M algorithm with polishing and checking the Kuhn-Tucker conditions (see icfit help details). It allows functions for the initfit option in order to calculate the starting value of the distribution in the E-M algorithm. Because icfit checks the Kuhn-Tucker conditions, we can try functions without doing extensive quality control, since if the starting distribution is not close to the true NPMLE the only downside is a slower convergence. But if the initfit function is the true NPMLE then convergence happens on the first iteration. Functions must input 5 objects, L,R, Lin, Rin, and A, but need not use all of them.

Usage

initcomputeMLE(L,R,Lin,Rin,A=NULL,max.inner=10,max.outer=1000,tol=1e-10)
initEMICM(L=NULL,R=NULL,Lin=NULL,Rin=NULL,A=NULL,maxiter=1000,tol=1e-7)

Arguments

L
numeric vector of left endpoints of censoring interval (equivalent to first element of Surv when type='interval2', see icfit details)
R
numeric vector of right endpoints of censoring interval (equivalent to second element of Surv function when type='interval2', see icfit details)
Lin
logical vector, should L be included in the interval? (see icfit details)
Rin
logical vector, should R be included in the interval? (see icfit details)
A
clique matrix
max.inner
max.outer
tol
see either computeMLE or EMICM
maxiter
see EMICM

Value

  • The function initcomputeMLE outputs an icfit object with 'pf' and 'intmap' values and some other values defined in the help for computeMLE. The function initEMICM outputs an icsurv object with a 'pf' element but no 'intmap' element, in addition to some other values defined in the help for EMICM. Here we define pf and intmap:
  • pfvector of estimated probabilities of the distribution
  • intmap2 by k matrix, where the ith column defines an interval corresponding to the probability, pf[i]

Details

In order to work correctly within icfit the function should output a list with at least a 'pf' element giving the estimated mass of the distribution for a series of intervals. Further, if an 'intmap' element is included (describing the series of intervals) it will be used by icfit.

See Also

icfit, computeMLE, EMICM

Examples

Run this code
## If you want speed and trust the MLEcens package, then there is no need to use icfit at all
## (but the convergence checks in icfit do not take much additional time)
data(bcos)
fit<-initcomputeMLE(bcos$left,bcos$right)
summary(fit)
plot(fit)

Run the code above in your browser using DataLab