td.sens.spec {survcomp} | R Documentation |
The function is a wrapper for the survivalROC.C
function in order to compute sensitivity and specificity for a binary classification of survival data.
td.sens.spec(cl, surv.time, surv.event, time, span = 0, sampling = FALSE, na.rm = FALSE, ...)
cl |
vector of binary classes. |
surv.time |
vector of times to event occurrence. |
surv.event |
vector of event occurrence indicators. |
time |
time point for sensitivity and specificity estimations. |
span |
Span for the NNE. Default value is 0. |
sampling |
jackknife procedure to estimate the standard error of sensitivity and specificity estimations. |
na.rm |
|
... |
additional arguments to be passed to the |
Only NNE method is used to estimate sensitivity and specificity (see survivalROC.C
). The standard error for sensitivity and specificity is estimated through jackknife procedure (see jackknife
).
sens |
sensitivity estimate |
sens.se |
standard error for sensitivity estimate |
spec |
specificity estimate |
spec.se |
standard error for specificity estimate |
Benjamin Haibe-Kains
Heagerty, P. J. and Lumley, T. L. and Pepe, M. S. (2000) "Time-Dependent ROC Curves for Censored Survival Data and a Diagnostic Marker", Biometrics, 56, pages 337–344.
Efron, B. and Tibshirani, R. (1986). "The Bootstrap Method for standard errors, confidence intervals, and other measures of statistical accuracy", Statistical Science, 1 (1), pages 1–35.
set.seed(12345) gender <- sample(c(0,1), 100, replace=TRUE) stime <- rexp(100) cens <- runif(100,.5,2) sevent <- as.numeric(stime <= cens) stime <- pmin(stime, cens) mysenspec <- td.sens.spec(cl=gender, surv.time=stime, surv.event=sevent, time=1, span=0, na.rm=FALSE)