59
의학연구자료의 생존분석 김호 서울대학교 보건대학원

의학연구자료의생존분석 - Welcome To Health Statistics Homepagehealthstat.snu.ac.kr/hokim/seminar/KH5.pdf · 2017-09-11 · C: censored data, Loss ... F: censored data,

Embed Size (px)

Citation preview

?

Time to an event

: , , , ,

2 :

(censoring)

Withdraw from the study (drop out)

Death from unrelated causes

, log()

( )

() (1,0)

(, )

Make-up data

Test: 1, 1, 1, 1+, 4+, 5+

Placebo: 1+, 2+, 3, 3+

(1) Ignore +

(2) Delete +s : ???

1 1 1 1 4 5 13 1 2 3 3 9,

6 6 4 4

1

2

3

4

t1

t2

t3

t4

X

X

O

O

X: , O:

Pt time delta sex age

1 10 1 1 65

2 12 0 2 70

3 7 0 1 67

4 5 1 2 45

5 .

6 .

11 1 11 5 gas out gas out . . complete data, censored data . (duration of ileus) .

)

A: censored data, Termination of the study, 4

B: complete data (uncensored data), End with Event, 2

C: censored data, Loss to follow up, 3

D: censored data, Termination of the study, 1

E: censored data, Drop-out, 1

F: censored data, Loss to follow up, 2

0

( ) ( )

( ) lim ( | ) /

( ) / ( )

dt

T

t

S t P T t

h t P t T t dt T t dt

f t S t

: t

: t

(0) 1, ( ) 0S S

0 :

, 20%

(0 - 1] 85 0

(1 - 2] 32 8

(2 - 3] 31 17

(3 - 4] 30 17

(4 - 5] 26 16

(5 - 6] 28 28

(6 - 7] 26 31

(7 - 8] 22 32

(8 - 9] 17 25

(9 - 10] 12 26

(10- 11] 9 18

(11- 12] 5 10

(12- 13] 5 7

(13- 3 11

(0-1] : + =331+246

= 577-0/2 =577

=/=85/577=0.1473

=1-=0.8527

=1

=1-

(1-2] : 577-85-0=492

= 492-8/2 =488

=/=32/488=0.0656

=1-=0.9344

=1*0.8527=0.8527

=1- =1-0.8527=0.1473

.

(0 - 1] 85 0

(1 - 2] 32 8

(2 - 3] 31 17

(3 - 4] 30 17

(4 - 5] 26 16

(5 - 6] 28 28

(6 - 7] 26 31

(7 - 8] 22 32

(8 - 9] 17 25

(9 - 10] 12 26

(10- 11] 9 18

(11- 12] 5 10

(12- 13] 5 7

(13- 3 11

SPSS . PBC

Mayo Clinic trial in primary biliarycirrhosis (PBC) of the liver conductedbetween 1974 and 1984.

: , trt(D-penicillamine and placebo), age, sex ,

: A.xls

> > > , ,

This subfile contains: 312 observations

Life Table

Survival Variable time time

Number Number Number Number Cumul

Intrvl Entrng Wdrawn Exposd of Propn Propn Propn Proba-

Start this During to Termnl Termi- Sur- Surv bility Hazard

Time Intrvl Intrvl Risk Events nating viving at End Densty Rate

------ ------ ------ ------ ------ ------ ------ ------ ------ ------

.0 312.0 .0 312.0 25.0 .0801 .9199 .9199 .0002 .0002

500.0 287.0 10.0 282.0 28.0 .0993 .9007 .8285 .0002 .0002

1000.0 249.0 34.0 232.0 24.0 .1034 .8966 .7428 .0002 .0002

1500.0 191.0 36.0 173.0 11.0 .0636 .9364 .6956 .0001 .0001

2000.0 144.0 32.0 128.0 12.0 .0938 .9063 .6304 .0001 .0002

2500.0 100.0 29.0 85.5 8.0 .0936 .9064 .5714 .0001 .0002

3000.0 63.0 16.0 55.0 10.0 .1818 .8182 .4675 .0002 .0004

3500.0 37.0 11.0 31.5 5.0 .1587 .8413 .3933 .0001 .0003

4000.0 21.0 15.0 13.5 2.0 .1481 .8519 .3350 .0001 .0003

4500.0 4.0 4.0 2.0 .0 .0000 1.0000 .3350 .0000 .0000

The median survival time for these data is 3343.6

SE of SE of

Intrvl Cumul Proba- SE of

Start Sur- bility Hazard

Time viving Densty Rate

------- ------ ------ ------

.0 .0154 .0000 .0000

500.0 .0214 .0000 .0000

1000.0 .0254 .0000 .0000

1500.0 .0275 .0000 .0000

2000.0 .0307 .0000 .0001

2500.0 .0342 .0000 .0001

3000.0 .0408 .0001 .0001

3500.0 .0459 .0001 .0002

4000.0 .0545 .0001 .0002

4500.0 .0545 .0000 .0000

0 1,000 2,000 3,000 4,000 5,000

time

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

2. 171 . , .

.

: 1/2

. .

. 171, 155.5 1-32/155.5=0.7942. 171-32-31=108, 108-22/2=97 . 31/97=0.3195 1 - 0.3195 = 0.6804. 0.79420.7942 x 0.6804=0.5404.

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0 1 2 3 4 5 6 7 8 9 10

Kaplan-Meier ()

S(3.0)=1-1/15=0.933, S(4.0)=0.933

S(4.5)=0.933*(1-2/13)=0.846 .

3.0 4.0+ 4.5 4.5 5.5 6.0 6.4 6.5

7. 0 7.5 8.4+ 10.0 10.0+ 12.0 15.0

/

3. 10 . + . .

3.5, 4.0+, 4.5, 4.5, 5.0, 6.0, 6.4+, 6.7, 7.0, 7.5

(: )

) 3.5 , S(3.5)=P(t>3.5)=p1 . 10 q1()=1-1/10=0.9. 4.0 4.0 . 0 S(4.0)=0.9. 4.5 8 1-2/8=0.75 S(4.5)=0.9*0.75=0.675 . .

0 1 0 0 10

3.5 0.9 0.1 1 9

4.0* . . 1 8

4.5 . . 2 7

4.5 0.675 0.325 3 6

5 0.5625 0.4375 4 5

6 0.45 0.55 5 4

6.4* . . 5 3

6.7 0.3 0.7 6 2

7 0.15 0.85 7 1

7.5 0 1 8 0

3.00 4.00 5.00 6.00 7.00 8.00time

0.0

0.2

0.4

0.6

0.8

1.0

Rem

rem.xls

-> -> -> ()

> > Kaplan-Meier > (1) > ()

Survival Analysis for t t

Time Status Cumulative Standard Cumulative Number

Survival Error Events Remaining

3.00 1.00 .9333 .0644 1 14

4.00 .00 1 13

4.50 1.00 2 12

4.50 1.00 .7897 .1081 3 11

5.50 1.00 .7179 .1198 4 10

6.00 1.00 .6462 .1275 5 9

6.40 1.00 .5744 .1320 6 8

6.50 1.00 .5026 .1336 7 7

7.00 1.00 .4308 .1324 8 6

7.50 1.00 .3590 .1283 9 5

8.40 .00 9 4

10.00 1.00 .2692 .1237 10 3

10.00 .00 10 2

12.00 1.00 .1346 .1135 11 1

15.00 1.00 .0000 .0000 12 0

Number of Cases: 15 Censored: 3 ( 20.00%) Events: 12

Survival Time Standard Error 95% Confidence Interval

Mean: 8.17 1.06 ( 6.10, 10.24 )

Median: 7.00 .55 ( 5.92, 8.08 )

Percentiles

25.00 50.00 75.00

Value 12.00 7.00 5.50

Standard Error 2.28 .55 1.25

2.50 5.00 7.50 10.00 12.50 15.00

t

0.0

0.2

0.4

0.6

0.8

1.0

5. 40 1 .

2, 3, 3, 5,6, 7+, 8, 8, 9, 10, 10, 11, 11+, 12, 12, 13, 14, 14, 16, 17+, 20, 21, 23, 30, 39, 40, 40+, 42, 42, 44, 45, 46, 46, ,48, 48+, 52, 52+, 52+, 52+

(+ )

SPSS .

.

a) ?

8

b) 50% ?

23, 95% CI (3.04, 42.96)

c) 40 20 17. 50% ?

ti ( ni-di)/ni . ni .

50% .

log-rank : ( )

BCG 33.7+ 3.9 10.5 5.4 19.5 23.8+ 7.9 16.9+ 16.6+ 33.7+ 17.1+

CP 8.0 26.9+ 21.4+ 18.1+ 16.0+ 6.9 11.0+ 24.8+ 23.0+ 8.3 10.8+ 12.2+ 12.5+ 24.4 7.7 14.8+ 8.2+ 8.2+ 7.8+

(:)

Ho: S1(t)= S2(t) for all t

Ha: S1(t) S2(t) for some t

1 2 ... kt t t

1 D1i N1i-D1i N1i 2 D2i N2i -D2i N2i Di Ni-Di Ni

it

t=3.9 t=5.4

t=7.7

BCG 1 10 11

CP 0 19 19

1 29 30

BCG 1 9 10

CP 0 19 19

1 28 29

BCG 0 9 9

CP 1 18 19

1 27 28

N1i , N2i, Di D1i

E(D1i)=N1i Di /Ni =E1i V(D1i)=V1i

T 1 , T .

2

1 1

1

1

1

{ ( )}k

i i

i

k

i

i

D E

T

V

- .

Gehan

Heavy censoring

Peto/Prentice

.

Tarone-Ware

2

1 1

1

2

1

1

{ ( )}k

i i i

i

k

i i

i

w D E

T

w V

/( 1)i iw N N

( )i iw S t

/( 1)i iw N N

: m1.xls

> > Kaplan-Meier > (1) , group , - > ()

Survival Analysis for t t

Total Number Number Percent

Events Censored Censored

group 1.00 11 5 6 54.55

group 2.00 19 5 14 73.68

Overall 30 10 20 66.67

Test Statistics for Equality of Survival Distributions for group

Statistic df Significance

Log Rank .75 1 .3873

Breslow 1.00 1 .3183

Tarone-Ware .94 1 .3328

Gehan Wilcoxon

0.00 10.00 20.00 30.00

t

0.0

0.2

0.4

0.6

0.8

1.0

group

1.00

2.00

1.00-

2.00-

4. (AML; acute myelocytic leukemia) 1 2 . 23 , .

(11) 9,13,13+,18,23,28+,31,34,45+,48,161

(12) 5,5,8,8,12,16+,23,27,30,33,43,45

(+ )

spss . .

Factor =

Time Status Cumulative Standard Cumulative NumberSurvival Error Events Remaining

5.00 1 115.00 .8333 .1076 2 108.00 3 98.00 .6667 .1361 4 812.00 .5833 .1423 5 716.00 5 623.00 .4861 .1481 6 527.00 .3889 .1470 7 430.00 .2917 .1387 8 333.00 .1944 .1219 9 243.00 .0972 .0919 10 145.00 .0000 .0000 11 0

Number of Cases: 12 Censored: 1 ( 8.33%) Events: 11Survival Time Standard Error 95% Confidence Interval

Mean: 22.71 4.39 ( 14.11, 31.30 )Median: 23.00 11.43 ( .60, 45.40 )

Factor =

Time Status Cumulative Standard Cumulative NumberSurvival Error Events Remaining

9.00 .9091 .0867 1 1013.00 .8182 .1163 2 913.00 2 818.00 .7159 .1397 3 723.00 .6136 .1526 4 628.00 4 531.00 .4909 .1642 5 434.00 .3682 .1627 6 345.00 6 248.00 .1841 .1535 7 1161.00 7 0Number of Cases: 11 Censored: 4 ( 36.36%) Events: 7

Survival Time Standard Error 95% Confidence IntervalMean: 52.65 19.83 ( 13.78, 91.51 )(Limited to 161.00 )Median: 31.00 7.36 ( 16.58, 45.42 )

Survival Analysis for Total Number

Number PercentEvents

Censored Censored 12 11 1

8.33 11 7 4

36.36Overall 23 18

5 21.74

Test Statistics for Equality of Survival Distributions for

Statistic df SignificanceLog Rank 3.40 1 .0653Breslow 2.72 1 .0989

)

, . Survival time sample size95% log rank test p=0.065. p 0.05 drop out .

Cox ( )

T () x1,x2, , xk

: x 0

i j .

0 1 1( ) ( )exp( ... )k kh t h t x x

0 1 1log ( ) log ( ) ... k kh t h t x x

0 ( )h t

1 1 1( ) / ( ) exp( ( ) ... ( ))i j i j k ik jkh t h t x x x x

Cox () 1 1 1( ) / ( ) exp( ( ) ... ( ))i j i j k ik jkh t h t x x x x

x1 =1 for male, 0 for female

0 1 2 2log ( | ) log ( ) ... k kh t Male h t x x for male

0 2 2log ( | ) log ( ) ... k kh t female h t x x for female

1

( | )log ( | ) log ( | ) log

( | )

h t maleh t male h t female

h t female

1

( | )exp( )

( | )

h t male

h t female Hazard Ratio

: Beta=0.057, HR=1.059 : HR 5.9% .

Cox () 1 1 1( ) / ( ) exp( ( ) ... ( ))i j i j k ik jkh t h t x x x x

x1 =

0 1 2 2log ( | 1) log ( ) ( 1) ... k kh t Age x h t x x x

0 1 1 2 2log ( | ) log ( ) ... k kh t Age x h t x x x

1

( | 1)log ( | 1) log ( | ) log

( | )

h t Age xh t Age x h t Age x

h t Age x

1

( | 1)exp( )

( | )

h t Age x

h t Age x

Hazard Ratio

: Beta=0.027, HR=1.027 : 1 HR 2.7% .

PBC

Mayo Clinic trial in primary biliarycirrhosis (PBC) of the liver conductedbetween 1974 and 1984.

: , trt(D-penicillamine and placebo), age, sex ,

: A.xls

> > Cox > , ,

N

(a) 125 40.1%

187 59.9%

312 100.0%

0 .0%

0 .0%

0 .0%

0 .0%

312 100.0%

a time: time

B Wald Exp(B) Exp(B) 95.0% CI

trt .057 .179 .102 1 .750 1.059 .745 1.504

Trt=1(D-penicillamine)0

B Wald Exp(B) Exp(B) 95.0% CI

trt .045 .188 .058 1 .810 1.046 .723 1.514

age .036 .009 15.101 1 .000 1.036 1.018 1.055

sex -.538 .245 4.815 1 .028 .584 .361 .944

edema 1.642 .296 30.680 1 .000 5.164 2.889 9.233

bili .129 .015 78.532 1 .000 1.137 1.105 1.170

> (bili, proth alb)

> > Cox > , , stage ( )

B Wald Exp(B) Exp(B) 95.0% CI

trt -.096 .186 .264 1 .607 .909 .631 1.308

age .027 .009 7.904 1 .005 1.027 1.008 1.046

sex -.430 .257 2.798 1 .094 .651 .393 1.077

edema .821 .301 7.427 1 .006 2.274 1.259 4.105

logalb -2.789 .770 13.128 1 .000 .062 .014 .278

logproth 3.129 1.213 6.653 1 .010 22.856 2.120 246.406

stage 4.163 3 .244

stage(1) -1.834 1.029 3.181 1 .074 .160 .021 1.199

stage(2) -.341 .315 1.172 1 .279 .711 .383 1.319

stage(3) -.188 .222 .714 1 .398 .829 .536 1.281

logbili .839 .102 67.947 1 .000 2.313 1.895 2.824

B Wald Exp(B) Exp(B) 95.0% CI

1 logbili 1.085 .093 135.092 1 .000 2.958 2.464 3.552

2 logalb -4.005 .676 35.061 1 .000 .018 .005 .069

logbili .983 .098 101.174 1 .000 2.673 2.207 3.238

3 age .036 .008 18.007 1 .000 1.036 1.019 1.053

logalb -3.675 .670 30.103 1 .000 .025 .007 .094

logbili .999 .096 107.520 1 .000 2.715 2.248 3.280

4 age .033 .009 14.648 1 .000 1.033 1.016 1.051

logalb -3.506 .671 27.330 1 .000 .030 .008 .112

logproth 3.541 .968 13.395 1 .000 34.510 5.180 229.903

logbili .915 .097 88.621 1 .000 2.498 2.064 3.022

5 age .033 .009 14.757 1 .000 1.034 1.016 1.052

edema .785 .299 6.881 1 .009 2.192 1.219 3.939

logalb -3.053 .724 17.781 1 .000 .047 .011 .195

logproth 3.016 1.024 8.676 1 .003 20.403 2.743 151.757

logbili .879 .099 79.299 1 .000 2.409 1.985 2.923

> (bili, proth alb)

> > Cox > , , stage ( ), : Wald

Cox

Plot vs

If Parallel: OK

Parallel but not equally spaced : transformation needed

Schoenfeld residuals should be a random walk !

0log( log ( ))qS t , 1,2,...,t q Q

sex 0 1

Log of Negative Log of SURVIVAL

-8

-7

-6

-5

-4

-3

-2

-1

0

1

2

time

0 1000 2000 3000 4000 5000

Cox

trt 0 1

Log of Negative Log of SURVIVAL

-7

-6

-5

-4

-3

-2

-1

0

1

time

0 1000 2000 3000 4000 5000

Cox

trt

Cox HR ()

-> time dependent covariate approach (.Extended Cox )

1. 1. : (>50)

2. Kaplan-Meier method: (< 50)

2. Mantel-Haenszel method

1. Mantel-Haenszel method

2. Log-rank method

3. Gehans generalized Wilcoxon

3. HR

Cox proportional Hazard model

1. (, , )

2. t-test , chi-square test ( )

3. , ( )

( )

( )

) 90% 2.0 95%

44 .

7

2

2

( )4 ,

(log( ))

Z ZD

2

2

(1.96 1.282)4 87.50 88 .

(log(2.0))event

( )

( )

) 90% 1.75 95%

1

30% (event free) (, censoring rate=30%),

141/0.30=202 .

2 2

2

( ) ( 1)4

( 1)

Z ZD

2 2

2

1.96 1.282 (1.75 1)141

(1.75 1)D event

= 7

7. ( ) (:, : )

=0.1 =0.2

=0.05 =0.10 =0.05 =0.10

1.25

1.50

1.75

2.00

2.25

2.50

844852

256262

134142

8894

6472

5058

688694

208214

110116

7278

5258

4248

630636

192196

100106

6670

4854

2842

496500

150154

8084

5256

3842

3034

[email protected]

http:// plaza.snu. ac.kr/ ~hokim

-> -> ->