[R] Nomogram with stratified cph in Design package-- failure probability
myi at mdanderson.org
Tue Nov 29 18:51:16 CET 2011
I am using Dr. Harrell's design package to make a nomogram. I was able to
make a beautiful one. However, I want to change 5-year survival probability
to 5-year failure probability.
I couldn’t get hazard rate from Hazard(f1) because I used cph for the model.
Here is my code:
f1 <- cph(Surv(retime,dfs) ~
age+her2+t_stage+n_stage+er+grade+cytcyt+Cyt_PCDK2 , data=data11,
surv=T, x=T, y=T, time.inc=5)
Here is the Error in UseMethod("Hazard") :
no applicable method for 'Hazard' applied to an object of class "c('cph',
surv10 <- function(lp) surv(10,lp)
surv5 <- function(lp) surv(5,lp)
quant <- Quantile(f1)
at.surv <- c(0.1, 0.3, 0.5, 0.7, 0.9)
at.med1<-c(2,3,4, 5,6,7,8, 10,15,20,25, 30)
nom<- nomogram(f1, conf.int=F,
fun=list(1-surv5, 1-surv10), funlabel=c('5-Year Survival Probability',
'10-Year Survival Probability' ), lp=F,
fun.at=c(at.surv, at.surv),label.every=1, force.label=FALSE, cex.axis=0.8,
I would very much appreciate any assistance in this matter.
Thank you Very much.
View this message in context: http://r.789695.n4.nabble.com/Nomogram-with-stratified-cph-in-Design-package-failure-probability-tp4120077p4120077.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help