[R] plot.survfit

Terry Therneau therneau at mayo.edu
Thu Feb 26 15:16:22 CET 2009


 For a fitted Cox model, one can either produce the predicted survival curve for 
a particular "hypothetical" subject (survfit), or the predicted curve for a 
particular cohort of subjects (survexp).  See chapter 10 of Therneau and 
Grambsch for a long discussion of the differences between these, and the various 
pitfalls.
 
 By default, survfit produces the curve for a hypothetical "average" subject 
whose covariate values are the respective means of the data set.  I'm not very 
keen on this estimate --- what is sex=.453, a hermaphrodite?  But it is the 
historical default.
 
 	Terry Therenau
 	
 ---- begin included message -------------
 
 I am confused when trying the function survfit.
my question is:  what does the survival curve given by plot.survfit mean?
is it the survival curve with different covariates at different points?
or just the baseline survival curve?

for example, I run the following code and get the survival curve

####
library(survival)
fit<-coxph(Surv(futime,fustat)~resid.ds+rx+ecog.ps,data=ovarian)
plot(survfit(fit,type="breslow"))
summary(survfit(fit,type="breslow"))
####

for the first two failure points, we have s(59|x1)=0.971, s(115|x2)=0.942
how can we guarantee that s(59|x1) is always greater than s(115|x2)?
since s(59|x1)=s_0(59)^exp(\beta'x1) and s(115|x2)=s_0(115)^exp(\beta'x2),
we can manipulate covariates to make s(59|x1) < s(115|x2), right?
do I miss anything?

thanks in advance




More information about the R-help mailing list