Version: | 1.0.3.1 |
Date: | 2013-01-13 |
Title: | Time-Dependent ROC Curve Estimation from Censored Survival Data |
Author: | Patrick J. Heagerty <heagerty@u.washington.edu>, packaging by Paramita Saha-Chaudhuri <paramita.sahachaudhuri.work@gmail.com> |
Maintainer: | Paramita Saha-Chaudhuri <paramita.sahachaudhuri.work@gmail.com> |
Depends: | R (≥ 1.6.1) |
Description: | Compute time-dependent ROC curve from censored survival data using Kaplan-Meier (KM) or Nearest Neighbor Estimation (NNE) method of Heagerty, Lumley & Pepe (Biometrics, Vol 56 No 2, 2000, PP 337-344). |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
Packaged: | 2022-12-05 15:15:50 UTC; hornik |
Repository: | CRAN |
Date/Publication: | 2022-12-05 15:33:48 UTC |
NeedsCompilation: | yes |
Mayo Marker data
Description
Two marker values with event time and censoring status for the subjects in Mayo PBC data
Format
A data frame with 312 observations and 4 variables: time (event time/censoring time), censor (censoring indicator), mayoscore4, mayoscore5. The two scores are derived from 4 and 5 covariates respectively.
Author(s)
Patrick J. Heagerty
References
Heagerty, P.J., Zheng, Y. (2005) Survival Model Predictive Accuracy and ROC Curves Biometrics, 61, 92 – 105
Time-dependent ROC curve estimation from censored survival data
Description
This function creates time-dependent ROC curve from censored survival data using the Kaplan-Meier (KM) or Nearest Neighbor Estimation (NNE) method of Heagerty, Lumley and Pepe, 2000
Usage
survivalROC(Stime, status, marker, entry = NULL, predict.time, cut.values =
NULL, method = "NNE", lambda = NULL, span = NULL, window =
"symmetric")
Arguments
Stime |
Event time or censoring time for subjects |
status |
Indicator of status, 1 if death or event, 0 otherwise |
marker |
Predictor or marker value |
entry |
Entry time for the subjects |
predict.time |
Time point of the ROC curve |
cut.values |
marker values to use as a cut-off for calculation of sensitivity and specificity |
method |
Method for fitting joint distribution of (marker,t), either of KM or NNE, the default method is NNE |
lambda |
smoothing parameter for NNE |
span |
Span for the NNE, need either lambda or span for NNE |
window |
window for NNE, either of symmetric or asymmetric |
Details
Suppose we have censored survival data along with a baseline marker value and we want to see how well the marker predicts the survival time for the subjects in the dataset. In particular, suppose we have survival times in days and we want to see how well the marker predicts the one-year survival (predict.time=365 days). This function roc.KM.calc(), returns the unique marker values, TP (True Positive), FP (False Positive), Kaplan-Meier survival estimate corresponding to the time point of interest (predict.time) and AUC (Area Under (ROC) Curve) at the time point of interest.
Value
Returns a list of the following items:
cut.values |
unique marker values for calculation of TP and FP |
TP |
True Positive corresponding to the cut offs in marker |
FP |
False Positive corresponding to the cut offs in marker |
predict.time |
time point of interest |
Survival |
Kaplan-Meier survival estimate at predict.time |
AUC |
Area Under (ROC) Curve at time predict.time |
Author(s)
Patrick J. Heagerty
References
Heagerty, P.J., Lumley, T., Pepe, M. S. (2000) Time-dependent ROC Curves for Censored Survival Data and a Diagnostic Marker Biometrics, 56, 337 – 344
Examples
data(mayo)
nobs <- NROW(mayo)
cutoff <- 365
## MAYOSCORE 4, METHOD = NNE
Mayo4.1= survivalROC(Stime=mayo$time,
status=mayo$censor,
marker = mayo$mayoscore4,
predict.time = cutoff,span = 0.25*nobs^(-0.20) )
plot(Mayo4.1$FP, Mayo4.1$TP, type="l", xlim=c(0,1), ylim=c(0,1),
xlab=paste( "FP", "\n", "AUC = ",round(Mayo4.1$AUC,3)),
ylab="TP",main="Mayoscore 4, Method = NNE \n Year = 1")
abline(0,1)
## MAYOSCORE 4, METHOD = KM
Mayo4.2= survivalROC(Stime=mayo$time,
status=mayo$censor,
marker = mayo$mayoscore4,
predict.time = cutoff, method="KM")
plot(Mayo4.2$FP, Mayo4.2$TP, type="l", xlim=c(0,1), ylim=c(0,1),
xlab=paste( "FP", "\n", "AUC = ",round(Mayo4.2$AUC,3)),
ylab="TP",main="Mayoscore 4, Method = KM \n Year = 1")
abline(0,1)
Time-dependent ROC curve estimation from censored survival data
Description
This function creates time-dependent ROC curve from censored survival data using the Nearest Neighbor Estimation (NNE) method of Heagerty, Lumley and Pepe, 2000
Usage
survivalROC.C(Stime,status,marker,predict.time,span)
Arguments
Stime |
Event time or censoring time for subjects |
status |
Indicator of status, 1 if death or event, 0 otherwise |
marker |
Predictor or marker value |
predict.time |
Time point of the ROC curve |
span |
Span for the NNE |
Details
Suppose we have censored survival data along with a baseline marker value and we want to see how well the marker predicts the survival time for the subjects in the dataset. In particular, suppose we have survival times in days and we want to see how well the marker predicts the one-year survival (PredictTime=365 days). This function returns the unique marker values, sensitivity (True positive or TP), (1-specificity) (False positive or FP) and Kaplan-Meier survival estimate corresponding to the time point of interest (PredictTime). The (FP,TP) values then can be used to construct ROC curve at the time point of interest.
Value
Returns a list of the following items:
cut.values |
unique marker values for calculation of TP and FP |
TP |
TP corresponding to the cut off in marker |
FP |
FP corresponding to the cut off in marker |
predict.time |
time point of interest |
Survival |
Kaplan-Meier survival estimate at predict.time |
AUC |
Area Under (ROC) Curve at time predict.time |
Author(s)
Patrick J. Heagerty
References
Heagerty, P.J., Lumley, T., Pepe, M. S. (2000) Time-dependent ROC Curves for Censored Survival Data and a Diagnostic Marker Biometrics, 56, 337 – 344
Examples
data(mayo)
nobs <- NROW(mayo)
cutoff <- 365
Staltscore4 <- NULL
Mayo.fit4 <- survivalROC.C( Stime = mayo$time,
status = mayo$censor,
marker = mayo$mayoscore4,
predict.time = cutoff,
span = 0.25*nobs^(-0.20))
Staltscore4 <- Mayo.fit4$Survival
plot(Mayo.fit4$FP, Mayo.fit4$TP, type = "l",
xlim = c(0,1), ylim = c(0,1),
xlab = paste( "FP \n AUC =",round(Mayo.fit4$AUC,3)),
ylab = "TP",main = "Year = 1" )
abline(0,1)