You are on page 1of 9

KM

This procedure estimates the survival function for time to occurrence of an event.
Some of the times may be “censored” in that the event does not occur during the
observation period, or contact is lost with participants (loss to follow-up).
If the subjects are divided into treatment groups, KM produces a survival
function for each treatment group (factor level) and a test of equality of the survival
functions across treatment groups. The survival functions across treatment groups
can also be compared while controlling for categories of a stratification variable.

Notation
The following notation is used throughout this chapter unless otherwise stated:
p Number of levels (strata) for the stratification variable
g Number of levels (treatment groups) for the factor variable

Estimation and SE for Survival Distribution


Suppose that for a given combination of the stratification and factor variables, a
random sample of n individuals yields a sample with k distinct observed failure
times (uncensored). Let t1 < K < t k represent the observed life times and TL be
the largest observation in the sample. (Note that TL = t k if the largest observation
is uncensored.) Define
ni = Number of subjects who are at risk at time ti .
di = Number of failures (deaths) at ti .
λ i = Number of censorings in interval [ ti , ti +1 ).

1
2 KM

Note that
n0 = n
ni +1 = ni − di − λ i , i = 0, 1, K , k − 1
t0 = 0
t k +1 = ∞
d0 = 0
λ0 = 0

16
The Kaplan-Meier estimate S$ t for the survival function is computed as

1 6 ∏ 1 − dn 
S$ t = i
i
ti < t

Note that

4 9 ∏ 1 − dn  , l = 1, 2, K, k .
l
S$ t l+ = i

i =1 i

S$4t 9 = 1
+
0

+  d 
S$4t 9 = S$4t 9 1 −+ l +1
l +1
 n 
l
l +1

S$4t 9 = 0 if n = d 1T = t and λ = 06, otherwise


+
k k k l k k

k
 d
S$4t 9 = ∏  1 −  , T ≥ t ≥ t
+
 n
l
k L k
l =1 l

S$4t 9, K , S$4t 9 are the survival functions shown in the table.


+
1
+
k
KM 3

4 9
The asymptotic standard error for S$ t l+ is computed as the square root of

2 l
4 4 99 4 9 ∑ n 1nd − d 6 ,
var S$ t l+ = S$ t l+
i i
i
i
l = 1, K , k .
i =1

1
Note: When nk = d k TL = t k and λ k = 0 , S$ t k+ = 0 and var S$ t k+ 6 4 9 4 4 99 = 0 .

Estimation of Mean Survival Time and Standard Error


%K S$3t 81t
k −1
6
KK∑
+
i i +1 − ti if TL = t k
i= 0
µ$ = &
KK $
k −1

K'∑ S3t 81t 6 3 81


− ti + S$ t k+ TL − t k 6
+
i i +1 otherwise
i= 0

The variance of the mean survival time is

2 7 ∑ n 1an d− d 6
k 2
var µ$ = i i

i =1 i i i

k −1
ai = ∑ S$3t 81t
l =i
+
l l +1 6 3 81
− tl + S$ t k+ TL − t k 6
k
d= ∑di =1
i

unless there are both censored and uncensored occurrences of the largest survival
time. In that case,
4 KM

k −1
27
var µ$ =
d
d −1 ∑ 1
ai2 di
ni ni − di 6
i =1

k −1
ai = ∑ S$3t 81t
+
l l +1 − tl 6
l =i

The standard error is the square root of the variance.

Plots
Survival Functions versus Time

16
The survival function S$ t is plotted against t.

Log Survival Functions versus Time

4 1 69 is plotted against t.
ln S$ t

Cumulative Hazard Functions versus Time

4 1 69 is plotted against t.
− ln S$ t

Estimation of Percentiles and Standard Error


100p percentile of the survival time, where p is between 0 and 1, is computed as

J 4 1 6 9L
t p = inf ti | S$ ti ≤ p
KM 5

The asymptotic variance of t p is estimated by

3 8
var t p =
4 3 89
var S$ t p

4 f$ 3t 89
2
p

3 8
where f$ t p is computed as

3 8 3t 8 − S$3t 8
S$ u p + 0.05 p − 0.05
f$ t p =
p − 0.05 − u p + 0.05

J 4 1 6 9L .
where uq = sup ti | S$ ti ≥ q

Testing the Equality of the Survival Functions


Three statistics are computed to test the equality of survival distributions in the
presence of arbitrary right censorship. These statistics are the logrank (Mantel-
Cox), the modified Wilcoxon test statistic (Breslow), and an alternative test statistic
proposed by Tarone and Ware (1977). Using the regression model proposed by Cox
(1972), all three test statistics have been modified for testing monotonic trend in
hazard functions.

Test Statistics

Let n 1s6 be the number of subjects in stratum s. Let

1 s6
t1 < K < t m
1 s6
s

be the observed failure times (responses) and


1 s6 1 s6
nli = in stratum s the number of individuals in group l at risk just prior to ti

1 s6
d li = number of deaths at ti
1 s6 in group l
6 KM

and

di0 s 5 = ∑ d0 5
g
s
li
l =1

ni0 s 5 = ∑ n0 5
g
s
li
l =1

Hence, the expected number of events in group l at time ti


1 s6 is given by

1 s6
1 s6 1 s6
di nli
E li =
n
1 s6
i

Define


U s = U 1 , K , U g −1
1 s6 1 s6  ′

with

1 s6 =
∑ w1 6  d 1 6 − E 1 6 
ms
s s s
Ul i li li for l = 1, K , g − 1 .
i =1

1 6 1 6
Also, let Vs be a g − 1 × g − 1 covariance matrix with

1 s6  1 s6 1 s6 
2 d i  ni − d i  n 1 s6  nli 
1 s6
1 s6
V =
jl
ms
 1 6 
∑  wi  n1s6 − 1 n1s6 δ jl − n1s6 
s ji
for j , l = 1, K , g − 1
i =1 i i i
KM 7

where

wi0 s 5 = 1 for log - rank test

wi0 s 5 = ni0 s 5 for Breslow test

wi0 s 5 = ni0 s 5 for Tarone Ware test

and

δ =
%&1 if j = l
jl
'0 otherwise

Define

p
U= ∑U s
s =1

and

p
V= ∑V s
s =1

The test statistic for the equality of the g survival functions is defined by

χ 2 = U ′V −1U

1 6
χ 2 has an asymptotic chi-square distribution with g − 1 degrees of freedom.
8 KM

Test Statistic for Trend


Let

3
t = t1 , K , t g 8′
be a vector with t j = trend weighting coefficient for group j . Form the vector

 1 s6
U 1 s6 = U 1 , K , U g1 6
s  ′

U 1s6 differs from U s only in the last component.


Let V 1 6 be a g × g matrix with element V
s 1 s6 for 1 ≤ l , j ≤ g . The test
lj
statistic is defined by

χ 2t =
1t ′U 6 2

t ′Vt

where

p
U= ∑U 1 6 s
s =1
p
V= ∑V1 6 s
s =1

The logrank, Breslow, and Tarone Ware tests may involve trend. Each of the test
statistics has a chi-square distribution with one degree of freedom.
KM 9

The default trend is defined as follows:

%K2−1 g − 16, K, − 3, − 1, 1, 3, K, 1 g − 167


t=&
K if g is even

KK − 1 g − 16 , K, − 1, 0, 1, K, 1 g − 16 
' 2 2 
otherwise

References
Cox, D. R. 1972. Regression models and life tables (with discussion). Journal of
the Royal Statistical Society, Series B, 34: 187–220.

Tarone, R. 1975. Tests for trend in life table analysis. Biometrika, 62: 679–682.

Tarone, R., and Ware, J. 1977. On distribution free tests for equality of survival
distributions. Biometrika, 64(1): 156–160.

You might also like