[R] rmean in survfit
Frank Harrell
f.harrell at vanderbilt.edu
Wed May 22 17:07:18 CEST 2013
One approach is to use the rms package's cph and Mean.cph functions.
Mean.cph (cph calls coxph and can compute Kaplan-Meier and other survival
estimates) can compute mean restricted life.
Frank
Dinesh W wrote
> I am using survfit to generate a survival curve. My population is such
> that my x axis is in days and i have a starting population of say 10,000
> of which say only 2000 are left as of day 365. When I try to print rmean
> it does not print and in any case I am not interested in that. I actually
> want to sum up all the daily survival values starting at 1.0 (S_0) for day
> 1 through 0.2 (S_365) through day 365. I then want to assume "r% retained
> each day" and compute the remaining integral as sum of a geometric series
> through infinity ( (S_365 * r) * 1/(1-r) ) or through a specific future
> time period (730 for example in which case the summation portion 1/ (1-r)
> would change). Is there an easy way to do this?
-----
Frank Harrell
Department of Biostatistics, Vanderbilt University
--
View this message in context: http://r.789695.n4.nabble.com/rmean-in-survfit-tp4667668p4667708.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list