cenROC | R Documentation |

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")
```

`Y` |
The numeric vector of event-times or observed times. |

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

`censor` |
The censoring indicator, |

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

`U` |
The vector of grid points where the ROC curve is estimated. The default is a sequence of |

`h` |
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). |

`bw` |
A character string specifying the bandwidth estimation method for the ROC itself. The possible options are " |

`method` |
The method of ROC curve estimation. The possible options are " |

`ktype` |
A character string giving the type kernel distribution to be used for smoothing the ROC curve: " |

`ktype1` |
A character string specifying the desired kernel needed for Beran weight calculation. The possible options are " |

`B` |
The number of bootstrap samples to be used for variance estimation. The default is |

`alpha` |
The significance level. The default is |

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

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.

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.