반응형

PBC 데이터를 통한 생존분석



PBC 데이터 다운받을 수 있는 사이트

http://www4.stat.ncsu.edu/~boos/var.select/pbc.html

http://www4.stat.ncsu.edu/~boos/var.select/pbc.dat.txt


데이터 구조

이 데이터는 D-penicillamine의 약효를 판단하기 위한 데이터이다. 이 약이 더 오랜시간 생존에 도움이 된다는 것을 밝히는 것이 목적이다.

id       = case number
futime   = number of days between registration and the earlier of death,
           transplantion, or study analysis time in July, 1986
status   = 0=alive, 1=liver transplant, 2=dead
drug     = 1= D-penicillamine, 2=placebo
age      = age in days
sex      = 0=male, 1=female
ascites  = presence of ascites: 0=no 1=yes
hepato   = presence of hepatomegaly 0=no 1=yes
spiders  = presence of spiders 0=no 1=yes
edema    = presence of edema 0=no edema and no diuretic therapy for edema;
          .5 = edema present without diuretics, or edema resolved by diuretics;
           1 = edema despite diuretic therapy
bili     = serum bilirubin in mg/dl
chol     = serum cholesterol in mg/dl
albumin  = albumin in gm/dl
copper   = urine copper in ug/day
alk_phos = alkaline phosphatase in U/liter
sgot     = SGOT in U/ml
trig     = triglicerides in mg/dl
platelet = platelets per cubic ml/1000
protime  = prothrombin time in seconds
stage    = histologic stage of disease

여기서 status가 0이면 해당 futime에 censoring된 자료이며, 2이면 futime에 실제로 '발생'이 이루어진 경우로 censoring이 되지 않은 자료이다. status=0,1의 경우 censoring된 자료이다. 생존분석에서는 censoring이냐 아니냐가 중요하기 때문에 이 데이터를 0=censoring,1=not censoring으로 바꾸는 작업을 해주면 좋다. 생존분석에서의 종속변수 Y는 'censoring 여부와' '어떠한 사건이 발생할 때까지의 시간'이 한 세트라고 보면 된다. 다른 여러가지 변수를 통해 이 시간을 예측하는 것이 목적이라고 할 수 있다. 이를 time to event를 예착한다고 한다.


또한 이 데이터의 경우 약이 생존에 어떤 영향을 미치는지를 알아보는 연구이므로, drug를 placebo=0, D-penicillamine=1로 재코딩해주는 것이 좋다. 이렇게 재코딩함으로써 분석할 때 해석의 이점을 볼 수 있다.

 


PBC 데이터 읽어오기

http://www4.stat.ncsu.edu/~boos/var.select/pbc.sas.txt

options nodate nonumber ps=2000 ls=100;
data pbc;
infile 'K:\pbc.dat.txt';
    input id futime status drug age sex ascites hepato spiders edema
            bili chol albumin copper alk_phos sgot trig platelet
            protime stage;
    age = age/365.25;
if _n_ > 312 then delete;
if status=1 then status=0;
run;
proc phreg data=pbc;
model futime*status(0)=drug age sex ascites hepato spiders edema
            bili chol albumin copper alk_phos sgot trig platelet
            protime stage;
run;


SAS를 통한 분석 (Cox Regression)


proc phreg data=pbc;
    model time*delta(0)=drug sex age stage;
run;


Analysis of Maximum Likelihood Estimates
Parameter DF Parameter
Estimate
Standard
Error
Chi-Square Pr > ChiSq Hazard
Ratio

drug

1 0.04474 0.18327 0.0596 0.8071 1.046
sex 1 -0.28166 0.24618 1.3091 0.2526 0.755
age 1 0.02804 0.00927 9.1520 0.0025 1.028
stage 1 0.75390 0.12458 36.6217 <.0001 2.125


이 때, time은 time to event이고, delta는 0=censoing, 1=not censoring이다. (0)은 0이 censoring이라는 것을 나타내준다. 실제로 알아보고 싶은것은 drug와 time(생존시간)의 관계이고, confounding을 없애기 위해 sex, age, stage와 같은 통제변수(control variable)와 함께 분석한다.  cox coxregression에서는 계수 추정치가 log(hazard ratio)의 증가량이므로 이를 exponential 해주면, hazard ratio가 증가하는 비율을 알 수 있게 된다. 예를 들어, exp(0.04474)=1.046 이다.


근데 이를 해석하면 오히려 약을 처방할 수록, hazard가 증가한다는 결론을 얻게된다. 이러한 결론에 관한 한가지 해석은 confounding에 의한 효과라는 것이다. 약을 처방받는 사람들이 대부분 위중한 환자들이기 때문에 이러한 현상이 나타나며, 제대로된 약의 효과를 알아보기 위해서는 더 많은 통제변수가 필요할 것이다.



Cox Regression에서 생존함수 식 유도하기


https://stats.stackexchange.com/questions/270164/how-do-i-interpret-a-cox-hazard-model-survival-curve

반응형
반응형