AUC.sh | R Documentation |
Song and Zhou's estimators of AUC for right-censored time-to-event data
AUC.sh(Surv.rsp, Surv.rsp.new=NULL, lp, lpnew, times,
type="incident", savesensspec=FALSE)
sens.sh(Surv.rsp, lp, lpnew, times, type="incident")
spec.sh(Surv.rsp, lp, lpnew, times)
Surv.rsp |
A |
Surv.rsp.new |
A |
lp |
The vector of predictors estimated from the training data. |
lpnew |
The vector of predictors obtained from the test data. |
times |
A vector of time points at which to evaluate AUC. |
type |
A string defining the type of true positive rate (TPR):
|
savesensspec |
A logical specifying whether sensitivities and specificities should be saved. |
The sens.sh
and spec.sh
functions implement the estimators of
time-dependent true and false positive rates proposed by Song and Zhou (2008).
The AUC.sh
function implements the estimators of cumulative/dynamic and
incident/dynamic AUC proposed by Song and Zhou (2008). These estimators are given
by the areas under the time-dependent ROC curves estimated by
sens.sh
and spec.sh
. In case of cumulative/dynamic
AUC, the iauc
summary measure is given by the integral of AUC on
[0, max(times
)] (weighted by the estimated probability density of
the time-to-event outcome). In case of incident/dynamic AUC, iauc
is
given by the integral of AUC on [0, max(times
)] (weighted by 2 times
the product of the estimated probability density and the estimated survival
function of the time-to-event outcome).
The results obtained from spec.sh
, spec.sh
and AUC.sh
are valid as long as lp
and lpnew
are the predictors of
a correctly specified Cox proportional hazards model. In this case, the
estimators remain valid even if the censoring times depend on the values of
the predictors.
AUC.sh
returns an object of class survAUC
. Specifically,
AUC.sh
returns a list with the following components:
auc |
The cumulative/dynamic or incident/dynamic AUC estimates
(evaluated at |
times |
The vector of time points at which AUC is evaluated. |
iauc |
The summary measure of AUC. |
sens.sh
and spec.sh
return matrices of dimensions times
x
lpnew + 1
. The elements of these matrices are the sensitivity and
specificity estimates for each threshold of lpnew
and for each time point
specified in times
.
Song, X. and X.-H. Zhou (2008).
A semiparametric approach for the covariate
specific ROC curve with survival outcome.
Statistica Sinica
18, 947–965.
AUC.uno
, AUC.cd
, AUC.hc
,
GHCI
, IntAUC
data(cancer,package="survival")
TR <- ovarian[1:16,]
TE <- ovarian[17:26,]
train.fit <- survival::coxph(survival::Surv(futime, fustat) ~ age,
x=TRUE, y=TRUE, method="breslow", data=TR)
lp <- predict(train.fit)
lpnew <- predict(train.fit, newdata=TE)
Surv.rsp <- survival::Surv(TR$futime, TR$fustat)
Surv.rsp.new <- survival::Surv(TE$futime, TE$fustat)
times <- seq(10, 1000, 10)
AUC_sh <- AUC.sh(Surv.rsp, Surv.rsp.new, lp, lpnew, times)
names(AUC_sh)
AUC_sh$iauc
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.