Skip to content
Prev 269220 / 398502 Next

val.surv

?I've ? attached a sample of the data sets, this is my full code.

#R 2.13
#library(survival)
#library(Hmisc)
#library(splines)
library(rms)
train<-as.data.frame( train<-read.csv("G:\\train.txt", header=T, sep="\t"))
test<-as.data.frame( test<-read.table("G:\\test.txt", header=T, sep="\t"))
f.1<-cph(Surv(time,event)~age, x=T, y=T,surv=T, data=train)
val.surv(f.1, newdata=test, u=10)


#plot(calibrate(f.1, u=30, B=20))