[R] K-M probability for each subject

David Winsemius dwinsemius at comcast.net
Fri May 20 01:06:19 CEST 2011


On May 19, 2011, at 5:20 PM, hsu ya-hui wrote:

> Dear R-user,
>
> I would like to get the survival probability (surv) for each subject  
> id.
> That is, I want to have additional column surv as follows:

The survival probability for each subject is 1 until death and 0  
thereafter.

>
> id  OS  OS_DUR  surv
> ____________________
>
>
> eg:
> fitKM<-survfit(Surv(OS_DUR,OS)~1,data=data)
> fitKM$surv # this will only give me survival probability and I do  
> not know
> the corresponding id
>
> Any one knows how to get the probability?

What do you really want?

-- 
David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list