4
$\begingroup$

I am running a survival analysis with descrete time. For that purpose I use the R package survival with this function

surv.km <- survfit(formula = Surv(analyse$Time, analyse$Event) ~ 1, conf.type = "log",
  conf.int = 0.95, type = "kaplan-meier", error = "greenwood", data = analyse)

In the following the terms, notation and symbols from Wikipedia are used.

I can plot the survival function S(t), the event function resp. cumulative density function F(t) (fun="event"), the cumulativ hazard function H(t) (fun="cumhaz") and some other functions.

However, is there a way to calculate the density function f(t) or the hazard function h(t)? Both are actually defined for continuous time. At the moment I use the following formulas:

$f(t) = F(t+1) - F(t) = S(t) - S(t+1)$ where $t$ is discrete

$h(t) = \frac{f(t)}{S(t)} = 1 - \frac{S(t+1)}{S(t)}$ where $t$ is discrete

Does this make sense and is mathematical well founded? References to books or papers are welcome!

$\endgroup$

1 Answer 1

7
$\begingroup$

According to Survival Analysis (Techniques for Censored and Truncated Data ), Klein and Moeschberger pg. 30-31, 1997, the discrete time density function would be

$P(X=t)= P(t-1<X\leq t) = P(X\leq t) - P(X\leq t-1) = F(t) - F(t-1) = (1-S(t))- (1-S(t-1)) = S(t-1)-S(t)$ S(0)=1

Likewise, the discrete hazard is defined to be

$P(X=t \mid X \geq t) = P( X=t \mid X> t-1) = \dfrac{P(X=t , X>t-1)}{P(X>t-1)} = \dfrac{P(X=t )}{S(t-1)}= \dfrac{S(t-1)-S(t)}{S(t-1)}=1-\dfrac{S(t)}{S(t-1)}$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.