Convert an object of class icsurv (created by several functions of the package Icens to a two-column data.frame that can be easily used to plot the fitted distribution function.
icsurv2cdf(fit)
Arguments
fit: an object of class icsurv, typically obtained by one of the functions EM, PGM, VEM, ISDM, EMICM of the package Icens.
### Distribution function of the emergence of tooth 44 on boys### (this example: only a subset of boys)data("tandmob", package="icensBKL")Boys <- subset(tandmob, fGENDER=="boy")Sboy <- Surv(Boys$L44, Boys$R44, type="interval2")Aboy <- subset(Boys, select=c("L44","R44"))Aboy$L44[is.na(Aboy$L44)]<-0Aboy$R44[is.na(Aboy$R44)]<-20## 20 = infinity in this casefitB.NPMLE <- EMICM(Aboy)print(fitB.NPMLE)plot(fitB.NPMLE)fitB.NPMLE <- icsurv2cdf(fitB.NPMLE)print(fitB.NPMLE)plot(fitB.NPMLE$time, fitB.NPMLE$cdf, type="l", xlim=c(6,13), ylim=c(0,1), xlab="Age (years)", ylab="Proportion emerged")