Professional Documents
Culture Documents
PBHS32700 Lecture15
PBHS32700 Lecture15
PBHS32700 Lecture15
James J. Dignam
dk
ĥ(t ) = (2)
(n k0 − d k /2)τk
where τk = t k+1 − t k .
. l t a b l e t i m e s t a t u s , i n t e r v a l ( 1 0 ) hazard
Assume:
λ j = event rate for subjects in interval j is constant within the
interval
d j = Poisson(µ j ) where µ j = N j λ j
Then the maximum likelihood estimate for λ j is given by:
λ̂ j = d j /N j
hazards a bit different from actuarial (due to how time boundaries defined) but not inconsistent with
those estimates in a small dataset.
f a i l u r e _d : death == 1
analysis time _t : timeyrs
id : ptid
Λ̂(t ) = − log{S km [t ]}
Rt
Another Estimator: Recall also that Λ(t ) = 0 λ(s) d s which
provides an additional estimator
l 1- l 2- l 3- l -
j -
τ0 τ1 τ2 ... τj t
Events: d 1 d2 d3 ... dj
Person Time: N1 N2 N3 ... Nj
λ̂ j = d j /N j
Z t X dj
Λ̂(t ) = λ̂(s) d s = lj
0 t j ≤t Nj
Nj ≈ l j nj
X dj
Λ̂(t ) =
t j ≤t nj
. s t s l i s t , na a t ( 0 1 : 10 )
0.40
0.30
0.20
0.10
0.00 Nelson−Aalen cumulative hazard estimates, by female
0 2 4 6 8 10
analysis time
female = 0 female = 1
0 2 4 6 8
analysis time
Where
t i is the follow-up time for patient i - add up each patient’s time
observed until failure or censoring
D is the number of failure events (relapses, deaths, etc). When
events are recorded using a 0/1 indicator di , then D = iN=1 di
P
We can obtain the average hazard rate using the stsum or strate
command in Stata. For the IUD data:
. stsum
f a i l u r e _d : status
analysis time _t : time
.00860421
. sort t r t
. stsum , by ( t r t )
| incidence no . o f
trt | time at r i s k rate subjects
−−−−−−+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
1 | 98724.69994 .0024107 696
2 | 102409.9001 .0019529 699
−−−−−−+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
total | 201134.6 .0021776 1395
H0 : H R = 1.0 versus
HA : H R 6= 1.0
6-MP Control
(N=21) (N=21)
6,6,6,6*,7, 1,1,2,2,3,
9*,10,10*,11*, 4,4,5,5,8,
13,16,17*,19*, 8,8,8,11,
20*,22,23,25*, 11,12,12,15,
32*,32*,34*,35* 17,22,23
1.00
0.80
0.60
0.40
0.20
0.00
0 10 20 30 40
weeks
placebo 6−MP
H0 :S 0 (t 0 ) = S 1 (t 0 )
H A :S 0 (t 0 ) 6= S 1 (t 0 )
Ŝ 0 (t 0 ) − Ŝ 1 (t 0 )
Z=q ∼ N (0, 1) under H0
V̂ [Ŝ 0 (t 0 )] + V̂ [Ŝ 1 (t 0 )]
Problems:
1 Comparing survival at a single time point is subjective and may
not reflect clinical question at hand
2 Testing differences at a single time point is inefficient since we
ignore information from the rest of the survival curve
Goal: Compare entire survival curves (up to the time interval sampled)
or
p
Z= TL ∼N
˙ (0, 1)
In Stata
. s t s e t time , f a i l u r e ( r e l a p s e )
. sts test txgrp
f a i l u r e _d : r e l a p s e
analysis time _t : time
Log − rank t e s t f o r e q u a l i t y o f s u r v i v o r f u n c t i o n s
| Events Events
txgrp | observed expected
−−−−−−−−−−−−+−−−−−−−−−−−−−−−−−−−−−−−−−
Control | 21 10.75
6−mp | 9 19.25
−−−−−−−−−−−−+−−−−−−−−−−−−−−−−−−−−−−−−−
Total | 30 30.00
chi2 (1) = 16.79
Pr > c h i 2 = 0.0000
£PD ¤2 £PD ¤2
k=1
w k (o k − e k ) w u
k=1 k k
TW = PD = PD
k=1
w k2 v k w2v
k=1 k k
Choices for w k
1 w k = n k gives the Gehan-Breslow test (weights equal to the total
number of subjects at risk at each failure time). Applies greater
weight to early failure times.
2 w k = Ŝ K M (t k −) gives the generalized Wilcoxon test (weights
equal to the pooled estimate of survival (across groups) just prior
to time t k ). Applies greater weight to early failure times.
Equivalent to the Wilcoxon rank sum statistic when there is no
censoring.
λ1 (t ) = φλ0 (t )
so that
So, if the log cumulative hazards are roughly parallel, the logrank
test will be most powerful
0 10 20 30 40
time
logH0 logH1
f a i l u r e _d : relapse
analysis time _t : time
Fleming − H a r r i n g t o n t e s t f o r e q u a l i t y o f s u r v i v o r f u n c t i o n s