survAccuracyMeasures

This R package computes non-parametric (NP) and semi-parametric (SP) estimates of common accuracy measures for risk prediction markers from survival data. It consists of the function survAM.estimate which estimates the AUC, TPR( c ), FPR( c ), PPV( c ), and NPV( c ) for for a specific prediction time and marker cutoff value c.

NP estimates are calculated using inverse probability weighting, while SP estimates are based on a Cox proportional hazards model. For detailed information regarding estimation methods, see references below.

Standard errors for estimates can be obtained by bootstrapping. Asymptotic standard error calculations are also available for semi-parametric Cox estimates. Confidence intervals using a normal approximation are computed.

Tutorial

#install the package from github
# download the package from github
if (!require("devtools")) install.packages("devtools")
devtools::install_github("survAccuracyMeasures", "mdbrown")
library(survAccuracyMeasures)
set.seed(112233)
#simulated data for illustration
data(SimData)
head(SimData)

Estimate all measures, using the bootstrap to estimate standard errors. First we obtain non-parametric estimates using inverse probablity weighting:

#Estimate all the measures at prediction time 2, with a marker cutpoint at 0. 

#non-parametric estimates with bootstrap standard errrors
##in practice 'bootstraps' should be set to a larger value
survAM.estimate(time =survTime, 
                event = status, 
                marker = Y,
                data = SimData, 
                estimation.method = "IPW",    
                se.method = "bootstrap",
                predict.time = 1, 
                marker.cutpoint = 0.5, 
                bootstraps = 50)

Alternatively, we can calculate semi-parametric estimates based on a Cox proportional hazards model:

#semi-parametric estimates assuming a cox model
##in practice 'bootstraps' should be set to a larger value
survAM.estimate(time =survTime, 
                event = status, 
                marker = Y,
                data = SimData, 
                estimation.method = "Cox",
                se.method = "bootstrap",
                predict.time = 1, 
                marker.cutpoint = 0, 
                bootstraps = 50)


## here we calculate the SE's based on the asymptotic properties of the Cox estimator.  
survAM.estimate(time =survTime, 
                event = status, 
                marker = Y,
                data = SimData, 
                estimation.method = "Cox",    
                se.method = "asymptotic",
                predict.time = 1, 
                marker.cutpoint = 0)

For more information see ?survAM.estimate.

References

Liu D, Cai T, Zheng Y. Evaluating the predictive value of biomarkers with stratified case-cohort design. Biometrics 2012, 4: 1219-1227.

Pepe MS, Zheng Y, Jin Y. Evaluating the ROC performance of markers for future events. Lifetime Data Analysis. 2008, 14: 86-113.

Zheng Y, Cai T, Pepe MS, Levy, W. Time-dependent predictive values of prognostic biomarkers with failure time outcome. JASA 2008, 103: 362-368.



Try the survAccuracyMeasures package in your browser

Any scripts or data that you put into this service are public.

survAccuracyMeasures documentation built on May 29, 2017, 11:59 a.m.