Time-Dependent ROC Analysis
Usage
timeroc(
data,
elapsedtime,
outcome,
outcomeLevel,
marker,
timepoints = "12, 36, 60",
method = "incident",
bootstrapCI = FALSE,
nboot = 100,
plotROC = TRUE,
plotAUC = TRUE,
timetypeoutput = "months",
showOptimalCutoff = TRUE,
showMarkerStats = TRUE,
compareBaseline = FALSE,
smoothAUC = FALSE
)
Arguments
- data
.
- elapsedtime
.
- outcome
.
- outcomeLevel
.
- marker
.
- timepoints
.
- method
.
- bootstrapCI
.
- nboot
.
- plotROC
.
- plotAUC
.
- timetypeoutput
Time units for display in plots and results.
- showOptimalCutoff
Calculate and display optimal cutoff points that maximize Youden index.
- showMarkerStats
Display descriptive statistics for the marker variable.
- compareBaseline
Compare marker performance to a baseline model (AUC = 0.5).
- smoothAUC
Apply smoothing to the AUC over time plot for better visualization.
Value
A results object containing:
results$text | a html | ||||
results$aucTable | a table | ||||
results$rocPlot | an image | ||||
results$aucPlot | an image | ||||
results$markerStats | a table | ||||
results$cutoffTable | a table | ||||
results$modelComparison | a html | ||||
results$clinicalInterpretation | a html |
Tables can be converted to data frames with asDF
or as.data.frame
. For example:
results$aucTable$asDF
as.data.frame(results$aucTable)