Re: [R] K-M probability for each subject

2011-05-19 Thread David Winsemius
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

[R] K-M probability for each subject

2011-05-19 Thread hsu ya-hui
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: 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