cenROC: Estimation of the time-dependent ROC curve for right censored...

View source: R/cenROC.R

cenROCR Documentation

Estimation of the time-dependent ROC curve for right censored survival data


This function computes the time-dependent ROC curve for right censored survival data using the cumulative sensitivity and dynamic specificity definitions. The ROC curves can be either empirical (non-smoothed) or smoothed with/wtihout boundary correction. It also calculates the time-dependent area under the ROC curve (AUC).


cenROC(Y, M, censor, t, U = NULL, h = NULL, bw = "NR", method = "tra",
    ktype = "normal", ktype1 = "normal", B = 0, alpha = 0.05, plot = "TRUE")



The numeric vector of event-times or observed times.


The numeric vector of marker values for which the time-dependent ROC curves is computed.


The censoring indicator, 1 if event, 0 otherwise.


A scaler time point at which the time-dependent ROC curve is computed.


The vector of grid points where the ROC curve is estimated. The default is a sequence of 151 numbers between 0 and 1.


A scaler for the bandwidth of Beran's weight calculaions. The defualt is the value obtained by using the method of Sheather and Jones (1991).


A character string specifying the bandwidth estimation method for the ROC itself. The possible options are "NR" for the normal reference, the plug-in "PI" and the cross-validation "CV". The default is the "NR" normal reference method. The user can also introduce a numerical value.


The method of ROC curve estimation. The possible options are "emp" emperical metod; "untra" smooth without boundary correction and "tra" is smooth ROC curve estimation with boundary correction. The default is the "tra" smooth ROC curve estimate with boundary correction.


A character string giving the type kernel distribution to be used for smoothing the ROC curve: "normal", "epanechnikov", "biweight", or "triweight". By default, the "normal" kernel is used.


A character string specifying the desired kernel needed for Beran weight calculation. The possible options are "normal", "epanechnikov", "tricube", "boxcar", "triangular", or "quartic". The defaults is "normal" kernel density.


The number of bootstrap samples to be used for variance estimation. The default is 0, no variance estimation.


The significance level. The default is 0.05.


The logical parameter to see the ROC curve plot. The default is TRUE.


The empirical (non-smoothed) ROC estimate and the smoothed ROC estimate with/without boundary correction can be obtained using this function. The smoothed ROC curve estimators require selecting two bandwidth parametrs: one for Beran’s weight calculation and one for smoothing the ROC curve. For the latter, three data-driven methods: the normal reference "NR", the plug-in "PI" and the cross-validation "CV" were implemented. To select the bandwidth parameter needed for Beran’s weight calculation, by default, the plug-in method of Sheather and Jones (1991) is used but it is also possible introduce a numeric value. See Beyene and El Ghouch (2020) for details.


Returns the following items:

ROC The vector of estimated ROC values. These will be numeric numbers between zero

and one.

U The vector of grid points used.

AUC A data frame of dimension 1 \times 4. The columns are: AUC, standard error of AUC, the lower

and upper limits of bootstrap CI.

bw The computed value of bandwidth. For the empirical method this is always NA.

Dt The vector of estimated event status.

M The vector of Marker values.


Kassu Mehari Beyene and Anouar El Ghouch


Beyene, K. M. and El Ghouch A. (2020). Smoothed time-dependent receiver operating characteristic curve for right censored survival data. Statistics in Medicine. 39: 3373– 3396.

Sheather, S. J. and Jones, M. C. (1991). A Reliable data-based bandwidth selection method for kernel density estimation. Journal of the Royal Statistical Society. Series B (Methodological) 53(3): 683–690.




est = cenROC(Y=mayo$time, M=mayo$mayoscore5, censor=mayo$censor, t=365*6)

cenROC documentation built on March 31, 2023, 5:19 p.m.

Related to cenROC in cenROC...