想做校准图,但是程序一致报错,
cox1 <- cph(Surv(survival_time,status) ~ age + sex + race + smoking + radiation + pharmaceutical + stage_T + stage_N + stage_M + surgery,surv=T,x=T, y=T,time.inc = 13655,data=tcga)
cal <- calibrate(cox1, cmethod="KM", method="boot", u=13655, m= 180, B=1000)
pdf("calibrate5.pdf",12,8)
par(mar = c(10,5,3,2),cex = 1.0)
plot(cal,lwd=3,lty=2,errbar.col="black"
,xlim = c(0,1),ylim = c(0,1)
,xlab ="Nomogram Predicted Survival"
,ylab="Actual Survival",col="blue")
lines(cal,c('mean.predicted','KM')
,type = 'a',lwd = 3,col ="black" ,pch = 16)
mtext(" ")
box(lwd = 1)
abline(0,1,lty = 3,lwd = 3,col = "black")
dev.off()