[R] plot of survival probability vs. covariate

array chip arrayprofile at yahoo.com
Fri Dec 12 00:23:37 CET 2003


Hi everyone,

I am fitting a cox proportional hazard model with a
continuous variable "x" as the covariate:

fit<-coxph(Surv(time, status)~x)

Now I wanted to make a plot of survival probability
vs. the covariate, and the 95% confidence interval for
the survival probability. It's just like a
Kaplan-Meier Survival curve, except now the x axis
represents the value of covariate, not the time.
Someone gave me a reference to a paper in JASA by Gary
(1992) for this type of plot, but I didn't have the
access to the paper. So I am wondering if anyone knows
how to do this in R or S-Plus?

In addition, can anyone explain to me what are the
following "type" options in predict.coxph()
predicting?

predict(fit,type='lp',se.fit=T)
predict(fit,type='risk',se.fit=T)
predict(fit,type='expected',se.fit=T)
predict(fit,type='terms',se.fit=T)


Thank you very much




More information about the R-help mailing list