unpencoxIC {ALassoSurvIC}R Documentation

Performing unpenalized nonparametric maximum likelihood estimation for interval censored and possibly left truncated data


The unpencoxIC function performs unpenalized nonparametric maximum likelihood estimation. The function provides unpenalized nonparametric maximum likelihood estimates, standard errors, and 95% confidence intervals. The full details are available in Li et al. (2019).


## Default S3 method:
unpencoxIC(lowerIC, upperIC, X, trunc = NULL, normalize.X = TRUE,
  cl = NULL, tol = 0.001, niter = 1e+05, string.cen = Inf, string.missing = NA, ...)



for S4 method only.


A numeric vector for the lower limit of the censoring interval.


A numeric vector for the upper limit of the censoring interval.


A numeric matrix for the covariates that will be used for variable selection.


A numeric vector for left truncated time. If supplied, the function performs the variable selection for interval censored and left truncated data. If trunc is missing, the data will be considered as interval censored data.


A logical value: if normalize.X = TRUE, the covariate matrix X will be normalized before fitting models. Default is TRUE.


A cluster object created by makeCluster in the parallel package. If NULL, no parallel computing is used by default. See details below.


A numeric value for the absolute iteration convergence tolerance.


A numeric value for the maximum number of iterations.


A string indicating right censoring for upperIC. Default is Inf.


A string indicating missing value. Default is NA.


The cluster object, created by makeCluster in the parallel package, can be supplied with the cl argument to reduce computation time via parallel computing. The parallel computing will be used when calculating the hessian matrix of the estimates. How to use the parallel computing is illustrated in one of the examples given below.

Use the baseline function and the plot function to extract and plot the estimate of the baseline cumulative hazard function, respectively, from the object returned by the unpencoxIC. The plot function also provides the plot for estimated baseline survival function. See the usages in the examples given below.


Li, C., Pak, D., & Todem, D. (2019). Adaptive lasso for the Cox regression with interval censored and possibly left truncated data. Statistical methods in medical research. https://doi.org/10.1177/0962280219856238

See Also




### Getting the unpenalized NPMLE for interval censored data
lowerIC <- ex_IC$lowerIC
upperIC <- ex_IC$upperIC
X <- ex_IC[, -c(1:2)]
system.time(result <- unpencoxIC(lowerIC, upperIC, X))

result           # main result
baseline(result) # obtaining the baseline cumulative hazard estimate
plot(result)     # plotting the estimated baseline cumulative hazard function by default
plot(result, what = "survival")  # plotting the estimated baseline survival function

## Use the parallel computing to reduce computational times
cl <- makeCluster(2L)  # making the cluster object 'cl' with two CPU cores
cl <- makeCluster(detectCores()) # run this code to use all CPU cores
system.time(result <- unpencoxIC(lowerIC, upperIC, X, cl = cl))

### Getting the unpenalized NPMLE for interval censored and left truncated data
## Try following codes with the 'ex_ICLT' data example
lowerIC <- ex_ICLT$lowerIC
upperIC <- ex_ICLT$upperIC
trunc <- ex_ICLT$trunc
X <- ex_ICLT[, -c(1:3)]
result2 <- unpencoxIC(lowerIC, upperIC, X, trunc)

plot(result2, what = "survival")

[Package ALassoSurvIC version 0.1.0 Index]