library(survival)
set.seed(21)
d=sampleData(50,outcome="survival")
nd=sampleData(50,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("Cox X1+X6+X8"=f1,"Cox X2+X5+X9"=f2), formula=Surv(time,event)~1,
data=nd, metrics="auc", nullModel=FALSE, times=seq(3:10))
plotAUC(xx)
plotAUC(xx,confint=TRUE)
plotAUC(xx,which="contrasts")
Run the code above in your browser using DataLab