On Thu, Mar 8, 2012 at 4:50 AM, Jason Connor <jcon...@alumni.cmu.edu> wrote: > I thought this would be trivial, but I can't find a package or function > that does this. > > I'm hoping someone can guide me to one. > > Imagine a simple case with two survival curves (e.g. treatment & control). > > I just want to calculate the difference in KM estimates at a specific time > point (e.g. 1 year) plus the estimate's 95% CI. The former is > straightforward, but the estimates not so much. > > I know methods exist such as Parzen, Wei, and Ying, but was surprised not > to find a package that included this. > > Before I code it up, I thought I'd ask if I was just missing it somewhere.
summary.survfit() in the survival package will give you the point estimate and standard error, and then combining these into a difference and confidence interval for the difference is easy. -thomas -- Thomas Lumley Professor of Biostatistics University of Auckland ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.