min
2011-Nov-29 17:51 UTC
[R] Nomogram with stratified cph in Design package-- failure probability
Hello, 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) surv<- Survival(f1) haz<- Hazard(f1) Here is the Error in UseMethod("Hazard") : no applicable method for 'Hazard' applied to an object of class "c('cph', 'Design', 'coxph')" 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) par(cex=0.8) 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, verbose=TRUE, cex.var=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.
min
2011-Nov-29 18:02 UTC
[R] Nomogram with stratified cph in Design package-- failure probability
sorry the code for nomogram par(cex=0.8) nom<- nomogram(f1, conf.int=F, fun=list(surv5, 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, verbose=TRUE, cex.var=0.8) Thanks Min -- View this message in context: http://r.789695.n4.nabble.com/Nomogram-with-stratified-cph-in-Design-package-failure-probability-tp4120077p4120118.html Sent from the R help mailing list archive at Nabble.com.
Frank Harrell
2011-Nov-29 23:06 UTC
[R] Nomogram with stratified cph in Design package-- failure probability
Please convert to rms. Design is no longer supported. See http://biostat.mc.vanderbilt.edu/Rrms Frank min wrote> > sorry the code for nomogram > > par(cex=0.8) > nom<- nomogram(f1, conf.int=F, > fun=list(surv5, 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, > verbose=TRUE, cex.var=0.8) > > Thanks > > Min >----- Frank Harrell Department of Biostatistics, Vanderbilt University -- View this message in context: http://r.789695.n4.nabble.com/Nomogram-with-stratified-cph-in-Design-package-failure-probability-tp4120077p4121136.html Sent from the R help mailing list archive at Nabble.com.