[R] Difference in Kaplan-Meier estimates plus CI

Thomas Lumley tlumley at uw.edu
Wed Mar 7 19:58:25 CET 2012


On Thu, Mar 8, 2012 at 4:50 AM, Jason Connor <jconnor at 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



More information about the R-help mailing list