tdrocc {survcomp} | R Documentation

## Function to compute time-dependent ROC curves

### Description

The function is a wrapper for the `survivalROC` function in order to compute the time-dependent ROC curves.

### Usage

    tdrocc(x, surv.time, surv.event, surv.entry = NULL, time, cutpts = NA,
      na.rm = FALSE, verbose = FALSE, span = 0, lambda = 0, ...)

### Arguments

`x` | vector of risk scores.
`surv.time` | vector of times to event occurrence.
`surv.event` | vector of event occurrence indicators.
`surv.entry` | entry time for the subjects.
`time` | time point for the ROC curve.
`cutpts` | cut points for the risk score.
`na.rm` | `TRUE` if the missing values should be removed from the data, `FALSE` otherwise.
`verbose` | verbosity of the function.
`span` | Span for the NNE, need either lambda or span for NNE.
`lambda` | smoothing parameter for NNE.
`...` | additional arguments to be passed to the `survivalROC` function.

### Value

`spec` | specificity estimates
`sens` | sensitivity estimates
`rule` | rule to compute the predictions at each cutoff
`cuts` | cutoffs
`time` | time point at which the time-dependent ROC is computed
`survival` | overall survival at the time point
`AUC` | Area Under the Curve (AUC) of teh time-dependent ROC curve
`data` | survival data and risk score used to compute the time-dependent ROC curve

### Author(s)

Benjamin Haibe-Kains

### References

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.

### See Also

`survivalROC`

### Examples

    set.seed(12345)
    age <- rnorm(100, 50, 10)
    stime <- rexp(100)
    cens <- runif(100,.5,2)
    sevent <- as.numeric(stime <= cens)
    stime <- pmin(stime, cens)
    tdroc <- tdrocc(x=age, surv.time=stime, surv.event=sevent, time=1,
      na.rm=TRUE, verbose=FALSE)
    ##plot the time-dependent ROC curve
    plot(x=1-tdroc$spec, y=tdroc$sens, type="l", xlab="1 - specificity",
      ylab="sensitivity", xlim=c(0, 1), ylim=c(0, 1))
    lines(x=c(0,1), y=c(0,1), lty=3, col="red")

[Package survcomp version 1.40.0 Index]