slowtests/test-roc.R

library(riskRegression)
library(rms)
d <- sampleData(273)
v <- sampleData(1827)
f <- CSC(Hist(time,event)~X1+rcs(X8)+rcs(X9)+rcs(X10),data = d)
x <- Score(list(f),data = v,formula = Hist(time,event)~1,plots = "roc")
X <- Score(list(f),data = v,formula = Hist(time,event)~1,plots = "roc",split.method = "bootcv",B = 5)
Y <- Score(list(f),data = v,formula = Hist(time,event)~1,plots = "roc",split.method = "cv5",B = 1)
y <- Score(list(f),data = v,formula = Hist(time,event)~1,plots = "roc",split.method = "cv5",B = 5)
Q <- Score(list(f),data = v,formula = Hist(time,event)~1,plots = "roc",split.method = "loob",B = 100)
plotROC(x)
plotROC(X,add = TRUE,col = 2)
plotROC(Y,add = TRUE,col = 3)
plotROC(y,add = TRUE,col = 4)
plotROC(Q,add = TRUE,col = 5)
tagteam/riskRegression documentation built on Oct. 19, 2024, 7:43 p.m.