el.cen.test <- function(x,d,fun=function(x){x},mu,error=1e-8,maxit=15) { xvec <- as.vector(x) n <- length(xvec) if(n <= 2) stop ("Need more observation") if(length(d)!=n) stop("length of x and d must agree") if(any((d!=0)&(d!=1))) stop ("d must be 0(right-censored) or 1(uncensored)") if(!is.numeric(xvec)) stop("x must be numeric") if(length(mu)!=1) stop("check the dim of constraint mu") temp <- Wdataclean2(xvec,d) dd <- temp$dd dd[length(dd)] <- 1 if(all(dd==1)) stop("there is no censoring, please use el.test()") xx <- temp$value n <- length(xx) ww <- temp$weight w0 <- WKM(x=xx, d=dd, w=ww)$jump uncenw0 <- w0[dd==1] funxx <- fun(xx) if((mu>max(funxx))|(muerror) & (m