Dear All, Maybe it is a silly question. But I wasn't able to find it from manual or R site search. I was wondering what is the corresponding time axis for survival function outputs in "survfit". I think it is "survfit(.......)$time", but not 100% sure. If it is, is it possible we could make survival function outputs on the pre-specified time grid with fixed increment and fixed length. Thank you so much. Regards, MJO
David Winsemius
2009-Oct-13 19:17 UTC
[R] time grid for "survfit" Survival function outputs
On Oct 13, 2009, at 12:03 PM, Muhtar Osman wrote:> Dear All, > > Maybe it is a silly question. But I wasn't able to find it from manual > or R site search.After library(survival) , the description of survfit objects will be found with: ?survfit.object> I was wondering what is the corresponding time axis for survival > function outputs in "survfit". I think it is "survfit(.......)$time", > but not 100% sure.What makes you doubt this?> If it is, is it possible we could make survival function outputs on > the pre-specified time grid with fixed increment and fixed length.With the appropriate supply of a dataset, it should be possible .... for various meanings of "pre-specified" and "fixed increment" and "fixed length", all of which at the moment are ambiguous at the moment. That is why the Posting Guide strongly suggests both an R encoded example and a clear specification of the desired output.> > Thank you so much. > > Regards, > > MJO-- David Winsemius, MD Heritage Laboratories West Hartford, CT
Terry Therneau
2009-Oct-14 13:58 UTC
[R] time grid for "survfit" Survival function outputs
> ... is it possible we could make survival function outputs on > the pre-specified time grid with fixed increment and fixed length.Look at the help file for summary.survfit. Interpolating the raw data is somewhat harder than you might think for the "number at risk" component. fit <- survfit(.... summary(fit, times=c(0,10,20,30,... Terry Therneau