[R] Estimating survival?

Thomas Lumley tlumley at u.washington.edu
Wed Nov 3 17:28:17 CET 2004


On Tue, 2 Nov 2004, Min-Han Tan wrote:

> Hi,
>
> Sorry to trouble the list. I have a problem which I'm not sure how to resolve.
>
> I have a Cox model with 1 independent variable with 2 categories (and
> thus 2 survival curves on plotting survfit)
>
> How can I get an estimate of survival for each category at a
> particular time point, with standard error?
>

Here's an example

>    fit <- coxph( Surv(futime,fustat)~rx,data=ovarian)

>    summary(  survfit( fit, newdata=list(rx=c(1,2))))
Call: survfit.coxph(object = fit, newdata = list(rx = c(1, 2)))

  time n.risk n.event survival1 survival2
    59     26       1     0.952     0.973
   115     25       1     0.903     0.945
   156     24       1     0.855     0.917
   268     23       1     0.806     0.888
   329     22       1     0.758     0.858
   353     21       1     0.710     0.828
   365     20       1     0.663     0.797
   431     17       1     0.613     0.764
   464     15       1     0.560     0.727
   475     14       1     0.509     0.689
   563     12       1     0.454     0.648
   638     11       1     0.403     0.606


 	-thomas




More information about the R-help mailing list