Skip to content
Prev 106755 / 398506 Next

Survfit with a coxph object

sj wrote:
cl <- data.frame(ag, sex, ac)
Don't need data= since everything is already available.
The delay is probably due to computations of confidence limits.  If you 
don't need them or don't mind using approximate confidence limits you 
can get very quick estimates using

library(Design)
f <- cph(Surv(time,ev) ~ ..., surv=TRUE)   # do ?cph
survplot(f, ...)  # do ?survplot
survest(f, ...)   # do ?survest
survfit(f, ...)   # do ?survfit

Or create a nomogram that gives users almost instant computations of 
survival probabilities at selected times without using a computer. 
There are examples of this in my book Regression Modeling Strategies. 
Do ?nomogram which has an example of drawing a nomogram that shows 
median, 3-month, and 6-month survival estimates from a parametric 
survival model fit, which you can also do with the Cox model using cph 
(a wrapper for coxph).

Frank Harrell