Hello, I am using Dr. Harrell's design package to make a nomogram. I was able to make a beautiful one without stratifying, however, I will need to stratify to meet PH assumptions. This is where I go wrong, but I'm not sure where.
Non-Stratified Nomogram: f<-cph(S~A+B+C+D+E+F+H,x=T,y=T,surv=T,time.inc=10*12,method="breslow") srv=Survival(f) srv120=function(lp) srv(10*12,lp) quant=Quantile(f) med=function(lp) quant(.5,lp) at.surv=c(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9) at.med=c(120,80,60,40,30,20,15,10,8,6,4,2,0) nomogram(f,lp=F, fun=list(srv120, med),funlabel=c("120-mo Survival","Median Survival"),fun.at=list(at.surv, at.med)) I get a the following warning: Warning message: In approx(fu[s], xseq[s], fat) : collapsing to unique 'x' values However, a great nomogram is constructed. But then I try to stratify... Stratified Nomogram: f<-cph(S~A+B+C+D+E+F+strat(H),x=T,y=T,surv=T,time.inc=10*12,method="breslow") srv=Survival(f) surv.p <- function(lp) srv(10*12, lp, stratum="Hist=P") surv.f <- function(lp) srv(10*12, lp, stratum="Hist=F") surv.o <- function(lp) srv(10*12, lp, stratum="Hist=O") quant=Quantile(f) med.p <- function(lp) quant(.5, lp, stratum="Hist=P") med.f <- function(lp) quant(.5, lp, stratum="Hist=F") med.o <- function(lp) quant(.5, lp, stratum="Hist=O") nomogram(f, fun=list(surv.p, surv.f, surv.o, med.p, med.f, med.o), + funlabel=c("S(120|P)","S(120|F)","S(120|O)", + "med(P)","med(F)","med(O)"), + fun.at=list(c(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9), + c(120,80,60,40,30,20,15,10,8,6,4,2,0))) the final nomogram only gives me a survival probability line for one of the 3 Hist categories "S(120|P)". It does show the letters "S(120|F)" but there is no survival probability line; there is nothing for the last category O, and no median risk at all. I considered the idea that I was exceeding some sort of space limitation, and tried to set total.sep.page=T, but it didn't change the output. I get the following error message: Error in axis(sides[jj], at = scaled[jj], label = fat[jj], pos = y, cex.axis = cex.axis, : no locations are finite I would very much appreciate any assistance in this matter. Thank you very much. ~Renee Park medical student Oregon Health & Science University Portland, OR -- View this message in context: http://www.nabble.com/Nomogram-with-stratified-cph-in-Design-package-tp23237422p23237422.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.