Skip to content
Back to formatted view

Raw Message

Message-ID: <1292266341.28092.6.camel@punchbuggy>
Date: 2010-12-13T18:52:21Z
From: Terry Therneau
Subject: survival package - calculating probability to survive a	given	time
In-Reply-To: <mailman.31.1292065207.30224.r-help@r-project.org>

- ------- included message --------
i try to calculate the probabilty to survive a given time by using the 
estimated survival curve by kaplan meier.

What is the right way to do that? as far as is see i cannot use the 
predict-methods from the survival package?
---- end inclusion --------

The survfit function directly estimates the probability you want, no
predict method is needed.  It is similar to quantile(x, 1:9/10), in that
you would not use predict on that either.

As to getting the value at a specific time, use
	summary(fit, time=20)
This correctly interpolates the step function when "20" is exactly one
of the event times.

Terry Therneau