Learn R Programming

riskRegression (version 1.4.3)

plotAUC: Plot AUC curve

Description

Plot AUC curve

Usage

plotAUC(x, models, type = "score", lwd = 2, xlim, ylim, axes = TRUE,
  confint = FALSE, ...)

Arguments

x

Object obtained with Score.list

models

Choice of models to plot

type

Character. Either "score" to show AUC or "contrasts" to show differences between AUC.

lwd

Line width

xlim

Limits for x-axis

ylim

Limits for y-axis

axes

Logical. If TRUE draw axes.

confint

Logical. If TRUE draw confidence shadows.

...

Not yet used

Examples

Run this code
# NOT RUN {
library(survival)
d=sampleData(100,outcome="survival")
nd=sampleData(100,outcome="survival")
f1=coxph(Surv(time,event)~X1+X6+X8,data=d,x=TRUE,y=TRUE)
f2=coxph(Surv(time,event)~X2+X5+X9,data=d,x=TRUE,y=TRUE)
xx=Score(list(f1,f2), formula=Surv(time,event)~1,
data=nd, metrics="auc", nullModel=FALSE, times=seq(3:10))
aucgraph <- plotAUC(xx)
plotAUC(xx,confint=TRUE)+ggtitle("AUC")+theme_classic()
plotAUC(xx,type="contrasts")
a=plotAUC(xx,type="contrasts",confint=TRUE)
a+theme_bw()


# }

Run the code above in your browser using DataLab