Last chance! 50% off unlimited learning
Sale ends in
Plot a survAUC
object generated by the functions AUC.uno
,
AUC.sh
, AUC.cd
, AUC.hc
and
predErr
.
# S3 method for survAUC
plot(x, col="red", type="l", ylim=c(0,1),
xlab="Time",ylab="AUC",
main="Time-dependent AUC", add=FALSE, ...)# S3 method for survErr
plot(x, col="red", type="l", ylim=c(0,1),
xlab="Time",ylab="Prediction error",
main="Time-dependent Prediction Error", add=FALSE, ...)
An object of class survAUC
.
The color used to draw the AUC curve.
The type of plot to be drawn. See
argument 'type' of the plot
function.
The y limits of the plot.
The title of the x axis. See title
.
The title of the y axis. See title
.
The main title of the plot. See title
.
A logical specifying whether the AUC-Curve should be added to an already existing plot.
Graphics parameters that can be passed to 'plot'.
AUC.sh
, AUC.cd
, AUC.hc
, AUC.uno
, predErr
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, 600, 10)
AUC_sh <- AUC.sh(Surv.rsp, Surv.rsp.new, lp, lpnew, times)
plot(AUC_sh)
abline(h = 0.5)
BrierScore <- predErr(Surv.rsp, Surv.rsp.new, lp, lpnew, times,
type = "brier", int.type = "weighted")
plot(BrierScore)
abline(h = 0.25)
Run the code above in your browser using DataLab