R4CR

Day2 - 회귀 / 생존 분석 | 2023-06-15
Jinseob Kim

Executive Summary

Dafault Repeated measure Survey
Continuous linear regression GEE Survey GLM
Event GLM (logistic) GEE Survey GLM
Time & Event Cox marginal Cox Survey Cox
0,1,2,3 (rare event) GLM (poisson) GEE Survey GLM

실습데이터

libary(survival)
data(colon)
colon

Linear regression

Continuous

Simple

\[Y = \beta_0 + \beta_1 X + \epsilon\]

  • 오차제곱합을 최소로하는 \(\beta_0, \beta_1\) 구한다.

  • \(Y\) 정규분포하는 연속변수, \(X\) 는 연속, 범주형 다 가능

    • \(X\) 연속변수일 땐 상관분석 과 동일
    • \(X\) 2범주일 땐 t.test with 등분산 과 동일

Simple 2

cor.test(colon$age, colon$nodes)

    Pearson's product-moment correlation

data:  colon$age and colon$nodes
t = -3.6597, df = 1774, p-value = 0.0002599
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 -0.13254350 -0.04021182
sample estimates:
        cor 
-0.08656354 
summary(lm(nodes ~ age, data = colon))$coefficients
               Estimate  Std. Error   t value     Pr(>|t|)
(Intercept)  5.20164796 0.428601525 12.136326 1.279575e-32
age         -0.02572043 0.007028022 -3.659696 2.598993e-04
summary(glm(age ~ nodes, data = colon))$coefficients
              Estimate Std. Error    t value     Pr(>|t|)
(Intercept) 60.8780528 0.40542964 150.156886 0.0000000000
nodes       -0.2913344 0.07960617  -3.659696 0.0002598993

Simple 3

t.test(time ~ sex, data = colon, var.equal = T)

    Two Sample t-test

data:  time by sex
t = -0.65063, df = 1774, p-value = 0.5154
alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
95 percent confidence interval:
 -117.4506   58.9366
sample estimates:
mean in group 0 mean in group 1 
       1527.400        1556.657 
summary(lm(time ~ sex, data = colon))$coefficients
              Estimate Std. Error    t value      Pr(>|t|)
(Intercept) 1527.39953   32.36421 47.1940973 1.189988e-315
sex           29.25699   44.96686  0.6506345  5.153667e-01

3범주 이상?

rx: 치료법 3개

levels(colon$rx)
[1] "Obs"     "Lev"     "Lev+5FU"

더미변수로 자동으로 바뀐 후 회귀식에 포함. 실제로는 변수 2개가 들어감

tail(model.matrix(time ~ rx, data = colon))
     (Intercept) rxLev rxLev+5FU
1853           1     1         0
1854           1     1         0
1855           1     0         1
1856           1     0         1
1857           1     1         0
1858           1     1         0

둘다 0 이면 Obs (reference)

3범주 이상 2

summary(lm(time ~ rx, data = colon))$coefficients
              Estimate Std. Error    t value      Pr(>|t|)
(Intercept) 1439.33770   38.03569 37.8417658 3.280940e-230
rxLev         39.62148   54.29140  0.7297929  4.656132e-01
rxLev+5FU    276.84569   54.53001  5.0769414  4.238516e-07

Obs와 Lev+5FU 군이 유의한 차이가 있음. ANOVA 형태로도 볼 수 있다 (등분산 가정).

anova(lm(time ~ rx, data = colon))
Analysis of Variance Table

Response: time
            Df     Sum Sq  Mean Sq F value    Pr(>F)    
rx           2   26301809 13150904  14.902 3.819e-07 ***
Residuals 1773 1564664354   882495                      
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

ANOVA p-value 는 rx 중 튀는 것이 있는지? 를 통합평가.

Multiple

여러 변수들을 포함

\[Y = \beta_0 + \beta_1 X_{1} + \beta_2 X_{2} + \cdots + \epsilon\]

  • \(\beta_1\) 해석: \(X_2, X_3 \cdots\) 를 보정한다면, \(X_1\) 이 1 증가할 때 \(Y\)\(\beta_1\) 만큼 증가한다.
summary(lm(time ~ sex + age + rx, data = colon))$coefficients
                Estimate Std. Error     t value     Pr(>|t|)
(Intercept) 1425.2773011 119.689429 11.90813019 1.652628e-31
sex           45.8552044  44.755366  1.02457444 3.057040e-01
age           -0.1706051   1.873203 -0.09107668 9.274420e-01
rxLev         38.3536023  54.334331  0.70588157 4.803546e-01
rxLev+5FU    279.7044350  54.618879  5.12102117 3.369819e-07

논문용 테이블은 보정 전후 결과를 같이 보여주는 것이 대세

Multiple 2 +

Logistic regression

0 or 1

logit

\[ P(Y = 1) = \frac{\exp{(X)}}{1 + \exp{(X)}}\]

Odds Ratio

\[ \begin{aligned} P(Y = 1) &= \frac{\exp{(\beta_0 + \beta_1 X_1 + \beta_2 X_2 + \cdots)}}{1 + \exp{(\beta_0 + \beta_1 X_1 + \beta_2 X_2 + \cdots)}} \\\\ \ln(\frac{p}{1-p}) &= \beta_0 + \beta_1 X_1 + \beta_2 X_2 + \cdots \end{aligned} \]

\(\beta_1\) 해석: \(X_2, X_3 \cdots\) 들 보정한다면, \(X_1\)이 1 증가할 때, \(\ln(\frac{p}{1-p})\)\(\beta_1\) 만큼 증가한다.

\(\frac{p}{1-p}\)\(\exp(\beta_1)\) 배 증가한다. 즉 Odd Ratio = \(\exp(\beta_1)\)

Odds Ratio 2

summary(glm(status ~ sex + age + rx, data = colon, family = binomial))

Call:
glm(formula = status ~ sex + age + rx, family = binomial, data = colon)

Coefficients:
             Estimate Std. Error z value Pr(>|z|)    
(Intercept)  0.442008   0.257400   1.717   0.0859 .  
sex         -0.107210   0.096230  -1.114   0.2652    
age         -0.003047   0.004026  -0.757   0.4491    
rxLev       -0.090039   0.116087  -0.776   0.4380    
rxLev+5FU   -0.623946   0.117929  -5.291 1.22e-07 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 2461.7  on 1775  degrees of freedom
Residual deviance: 2427.9  on 1771  degrees of freedom
AIC: 2437.9

Number of Fisher Scoring iterations: 4

Odds Ratio 3 +

Cox proportional hazard

Time & Event

Time to event data

대부분 Right censored: XX 일에 사망 or XX 일 까지 생존

Time to event 를 하나의 변수로

Kaplan-meier plot

생존분석에서 table 1의 의미

  • 보통 logrank test p-value 를 같이 보여줌.
jskm(
  survfit(Surv(time, status) ~ rx, data = colon), 
  table = T, pval = T, marks = F
)

계산: time 순서로 정렬

\[ \begin{aligned} P(t) &= \frac{t \text{ 구간 생존수}}{t \text{ 시점 관찰대상 수}} : \text{구간 생존율}\\\\ S(t) & = S(t-1) \times P(t) \end{aligned} \]

출처: https://dermabae.tistory.com/180

plot

jskm(
  survfit(Surv(time, status) ~ rx, data = colon), 
  table = T, pval = T, marks = F
)

중도절단 marks 는 보통 생략.

summary

summary(survfit(Surv(time, status) ~ rx, data = colon))
Call: survfit(formula = Surv(time, status) ~ rx, data = colon)

                rx=Obs 
 time n.risk n.event survival std.err lower 95% CI upper 95% CI
   20    610       1    0.998 0.00164        0.995        1.000
   36    609       1    0.997 0.00231        0.992        1.000
   43    608       1    0.995 0.00283        0.990        1.000
   45    607       1    0.993 0.00327        0.987        1.000
   59    606       1    0.992 0.00365        0.985        0.999
   72    605       1    0.990 0.00400        0.982        0.998
   77    604       1    0.989 0.00431        0.980        0.997
   79    603       1    0.987 0.00461        0.978        0.996
   80    602       2    0.984 0.00514        0.974        0.994
   85    600       1    0.982 0.00539        0.971        0.993
   86    599       1    0.980 0.00562        0.969        0.991
   88    598       1    0.979 0.00585        0.967        0.990
   94    597       1    0.977 0.00606        0.965        0.989
   98    596       1    0.975 0.00627        0.963        0.988
   99    595       2    0.972 0.00666        0.959        0.985
  101    593       1    0.970 0.00685        0.957        0.984
  102    592       1    0.969 0.00703        0.955        0.983
  103    591       1    0.967 0.00721        0.953        0.981
  108    590       1    0.966 0.00738        0.951        0.980
  109    589       1    0.964 0.00755        0.949        0.979
  113    588       2    0.961 0.00787        0.945        0.976
  121    586       1    0.959 0.00803        0.943        0.975
  122    585       1    0.957 0.00818        0.941        0.974
  125    584       1    0.956 0.00833        0.940        0.972
  127    583       1    0.954 0.00847        0.938        0.971
  131    582       1    0.952 0.00862        0.936        0.969
  139    581       1    0.951 0.00876        0.934        0.968
  143    580       1    0.949 0.00889        0.932        0.967
  145    579       1    0.948 0.00903        0.930        0.965
  154    578       1    0.946 0.00916        0.928        0.964
  157    577       1    0.944 0.00929        0.926        0.963
  161    576       1    0.943 0.00942        0.924        0.961
  164    575       1    0.941 0.00954        0.922        0.960
  165    574       2    0.938 0.00979        0.919        0.957
  166    572       2    0.934 0.01002        0.915        0.954
  167    570       1    0.933 0.01014        0.913        0.953
  173    569       3    0.928 0.01047        0.908        0.949
  185    566       2    0.925 0.01069        0.904        0.946
  187    564       1    0.923 0.01080        0.902        0.944
  188    563       1    0.921 0.01090        0.900        0.943
  189    562       1    0.920 0.01100        0.898        0.941
  201    561       1    0.918 0.01111        0.897        0.940
  203    560       1    0.916 0.01121        0.895        0.939
  208    559       2    0.913 0.01140        0.891        0.936
  215    557       2    0.910 0.01160        0.887        0.933
  218    555       2    0.907 0.01178        0.884        0.930
  221    553       1    0.905 0.01188        0.882        0.928
  223    552       1    0.903 0.01197        0.880        0.927
  227    551       1    0.902 0.01206        0.878        0.926
  228    550       1    0.900 0.01215        0.877        0.924
  229    549       1    0.898 0.01223        0.875        0.923
  230    548       3    0.893 0.01249        0.869        0.918
  237    545       1    0.892 0.01258        0.867        0.917
  238    544       3    0.887 0.01282        0.862        0.912
  241    541       1    0.885 0.01290        0.860        0.911
  242    540       1    0.884 0.01298        0.859        0.909
  243    539       1    0.882 0.01306        0.857        0.908
  245    538       1    0.880 0.01314        0.855        0.906
  253    537       1    0.879 0.01322        0.853        0.905
  256    536       1    0.877 0.01330        0.851        0.903
  257    535       1    0.875 0.01337        0.850        0.902
  259    534       2    0.872 0.01352        0.846        0.899
  263    532       1    0.870 0.01359        0.844        0.898
  264    531       2    0.867 0.01374        0.841        0.895
  271    529       1    0.866 0.01381        0.839        0.893
  273    528       1    0.864 0.01388        0.837        0.892
  275    527       1    0.862 0.01395        0.835        0.890
  276    526       1    0.861 0.01402        0.834        0.889
  279    525       1    0.859 0.01409        0.832        0.887
  280    524       1    0.857 0.01416        0.830        0.886
  286    523       1    0.856 0.01423        0.828        0.884
  289    522       1    0.854 0.01429        0.827        0.883
  291    521       1    0.852 0.01436        0.825        0.881
  294    520       1    0.851 0.01442        0.823        0.880
  296    519       1    0.849 0.01449        0.821        0.878
  304    518       1    0.848 0.01455        0.819        0.877
  308    517       1    0.846 0.01462        0.818        0.875
  311    516       1    0.844 0.01468        0.816        0.874
  313    515       1    0.843 0.01474        0.814        0.872
  315    514       1    0.841 0.01481        0.812        0.871
  322    513       1    0.839 0.01487        0.811        0.869
  331    512       1    0.838 0.01493        0.809        0.867
  334    511       1    0.836 0.01499        0.807        0.866
  337    510       1    0.834 0.01505        0.805        0.864
  344    509       1    0.833 0.01511        0.804        0.863
  349    508       1    0.831 0.01517        0.802        0.861
  352    507       1    0.830 0.01523        0.800        0.860
  354    506       1    0.828 0.01528        0.798        0.858
  360    505       1    0.826 0.01534        0.797        0.857
  362    504       1    0.825 0.01540        0.795        0.855
  365    503       1    0.823 0.01545        0.793        0.854
  372    502       1    0.821 0.01551        0.791        0.852
  374    501       1    0.820 0.01557        0.790        0.851
  378    500       1    0.818 0.01562        0.788        0.849
  379    499       1    0.816 0.01568        0.786        0.848
  381    498       1    0.815 0.01573        0.785        0.846
  382    497       1    0.813 0.01578        0.783        0.845
  384    496       3    0.808 0.01594        0.778        0.840
  390    493       1    0.807 0.01599        0.776        0.839
  398    492       1    0.805 0.01604        0.774        0.837
  401    491       1    0.803 0.01610        0.772        0.835
  402    490       1    0.802 0.01615        0.771        0.834
  406    489       1    0.800 0.01620        0.769        0.832
  409    488       1    0.798 0.01625        0.767        0.831
  411    487       2    0.795 0.01634        0.764        0.828
  413    485       2    0.792 0.01644        0.760        0.825
  417    483       1    0.790 0.01649        0.759        0.823
  421    482       1    0.789 0.01653        0.757        0.822
  433    480       2    0.785 0.01663        0.753        0.819
  435    478       1    0.784 0.01667        0.752        0.817
  437    477       2    0.780 0.01676        0.748        0.814
  438    475       2    0.777 0.01685        0.745        0.811
  459    471       1    0.775 0.01690        0.743        0.809
  461    470       1    0.774 0.01694        0.741        0.808
  462    469       1    0.772 0.01699        0.739        0.806
  464    468       1    0.770 0.01703        0.738        0.805
  465    467       2    0.767 0.01712        0.734        0.801
  474    465       1    0.765 0.01716        0.733        0.800
  480    464       1    0.764 0.01720        0.731        0.798
  485    463       1    0.762 0.01724        0.729        0.797
  489    461       1    0.761 0.01729        0.727        0.795
  493    460       1    0.759 0.01733        0.726        0.794
  495    459       1    0.757 0.01737        0.724        0.792
  496    458       1    0.756 0.01741        0.722        0.790
  499    457       2    0.752 0.01749        0.719        0.787
  506    455       1    0.751 0.01753        0.717        0.786
  510    454       1    0.749 0.01757        0.715        0.784
  523    453       1    0.747 0.01761        0.714        0.783
  532    452       1    0.746 0.01764        0.712        0.781
  534    451       1    0.744 0.01768        0.710        0.779
  537    450       1    0.742 0.01772        0.708        0.778
  540    449       1    0.741 0.01776        0.707        0.776
  542    448       1    0.739 0.01779        0.705        0.775
  543    447       1    0.737 0.01783        0.703        0.773
  547    446       1    0.736 0.01787        0.702        0.772
  555    445       1    0.734 0.01790        0.700        0.770
  561    444       1    0.732 0.01794        0.698        0.768
  563    443       2    0.729 0.01801        0.695        0.765
  570    441       1    0.727 0.01805        0.693        0.764
  576    440       1    0.726 0.01808        0.691        0.762
  577    439       1    0.724 0.01811        0.690        0.761
  581    438       1    0.722 0.01815        0.688        0.759
  587    437       1    0.721 0.01818        0.686        0.757
  591    436       1    0.719 0.01822        0.684        0.756
  593    435       1    0.718 0.01825        0.683        0.754
  594    434       1    0.716 0.01828        0.681        0.753
  595    433       1    0.714 0.01831        0.679        0.751
  599    432       1    0.713 0.01835        0.678        0.749
  608    430       1    0.711 0.01838        0.676        0.748
  612    429       1    0.709 0.01841        0.674        0.746
  622    428       1    0.708 0.01844        0.672        0.745
  625    427       1    0.706 0.01847        0.671        0.743
  632    426       1    0.704 0.01850        0.669        0.742
  659    425       2    0.701 0.01856        0.666        0.738
  663    423       2    0.698 0.01862        0.662        0.735
  665    421       1    0.696 0.01865        0.660        0.734
  670    419       1    0.694 0.01868        0.659        0.732
  673    418       1    0.693 0.01871        0.657        0.730
  685    417       1    0.691 0.01874        0.655        0.729
  686    416       1    0.689 0.01877        0.654        0.727
  687    415       1    0.688 0.01880        0.652        0.726
  692    414       1    0.686 0.01882        0.650        0.724
  700    413       1    0.684 0.01885        0.648        0.722
  702    412       2    0.681 0.01891        0.645        0.719
  709    410       1    0.679 0.01893        0.643        0.718
  712    409       1    0.678 0.01896        0.642        0.716
  716    408       1    0.676 0.01899        0.640        0.714
  717    407       1    0.674 0.01901        0.638        0.713
  718    406       1    0.673 0.01904        0.636        0.711
  721    405       1    0.671 0.01906        0.635        0.710
  726    404       1    0.669 0.01909        0.633        0.708
  730    403       1    0.668 0.01911        0.631        0.706
  731    402       1    0.666 0.01914        0.630        0.705
  735    401       1    0.664 0.01916        0.628        0.703
  743    400       1    0.663 0.01918        0.626        0.701
  748    399       1    0.661 0.01921        0.625        0.700
  752    398       1    0.659 0.01923        0.623        0.698
  753    397       1    0.658 0.01925        0.621        0.697
  758    396       1    0.656 0.01928        0.619        0.695
  760    395       1    0.654 0.01930        0.618        0.693
  761    394       1    0.653 0.01932        0.616        0.692
  770    393       1    0.651 0.01934        0.614        0.690
  772    392       1    0.649 0.01937        0.613        0.689
  774    391       2    0.646 0.01941        0.609        0.685
  775    389       1    0.645 0.01943        0.608        0.684
  803    388       1    0.643 0.01945        0.606        0.682
  832    387       1    0.641 0.01947        0.604        0.681
  833    386       1    0.640 0.01949        0.602        0.679
  835    385       1    0.638 0.01951        0.601        0.677
  840    384       1    0.636 0.01953        0.599        0.676
  845    383       1    0.635 0.01955        0.597        0.674
  854    381       1    0.633 0.01957        0.596        0.672
  855    380       1    0.631 0.01959        0.594        0.671
  863    379       1    0.630 0.01961        0.592        0.669
  871    378       1    0.628 0.01963        0.591        0.668
  874    377       1    0.626 0.01965        0.589        0.666
  883    376       1    0.625 0.01966        0.587        0.664
  887    375       1    0.623 0.01968        0.585        0.663
  901    373       1    0.621 0.01970        0.584        0.661
  912    372       1    0.620 0.01972        0.582        0.659
  924    371       1    0.618 0.01974        0.580        0.658
  928    370       1    0.616 0.01975        0.579        0.656
  929    369       1    0.615 0.01977        0.577        0.655
  930    368       1    0.613 0.01979        0.575        0.653
  936    367       1    0.611 0.01980        0.574        0.651
  949    366       1    0.610 0.01982        0.572        0.650
  957    365       1    0.608 0.01984        0.570        0.648
  961    364       1    0.606 0.01985        0.569        0.646
  963    363       1    0.605 0.01987        0.567        0.645
  966    362       1    0.603 0.01988        0.565        0.643
  975    361       1    0.601 0.01990        0.563        0.641
  976    360       1    0.600 0.01991        0.562        0.640
 1020    359       1    0.598 0.01993        0.560        0.638
 1021    358       1    0.596 0.01994        0.558        0.637
 1031    357       1    0.594 0.01995        0.557        0.635
 1042    356       1    0.593 0.01997        0.555        0.633
 1048    355       1    0.591 0.01998        0.553        0.632
 1057    354       2    0.588 0.02001        0.550        0.628
 1070    352       1    0.586 0.02002        0.548        0.627
 1079    351       1    0.584 0.02003        0.547        0.625
 1081    350       1    0.583 0.02004        0.545        0.623
 1083    349       1    0.581 0.02006        0.543        0.622
 1089    348       1    0.579 0.02007        0.541        0.620
 1101    347       1    0.578 0.02008        0.540        0.619
 1106    346       1    0.576 0.02009        0.538        0.617
 1130    345       1    0.574 0.02010        0.536        0.615
 1133    344       1    0.573 0.02011        0.535        0.614
 1134    343       1    0.571 0.02012        0.533        0.612
 1136    342       1    0.569 0.02013        0.531        0.610
 1139    341       2    0.566 0.02015        0.528        0.607
 1159    339       1    0.564 0.02016        0.526        0.605
 1166    338       1    0.563 0.02017        0.525        0.604
 1178    337       1    0.561 0.02018        0.523        0.602
 1195    336       1    0.559 0.02019        0.521        0.600
 1198    335       1    0.558 0.02020        0.520        0.599
 1209    333       1    0.556 0.02021        0.518        0.597
 1216    332       1    0.554 0.02022        0.516        0.595
 1230    331       1    0.553 0.02022        0.514        0.594
 1236    330       1    0.551 0.02023        0.513        0.592
 1237    329       1    0.549 0.02024        0.511        0.591
 1246    328       1    0.548 0.02025        0.509        0.589
 1262    327       1    0.546 0.02026        0.508        0.587
 1272    326       1    0.544 0.02026        0.506        0.586
 1274    325       1    0.543 0.02027        0.504        0.584
 1290    324       1    0.541 0.02028        0.503        0.582
 1295    323       1    0.539 0.02028        0.501        0.581
 1304    322       1    0.538 0.02029        0.499        0.579
 1313    321       1    0.536 0.02029        0.498        0.577
 1314    320       1    0.534 0.02030        0.496        0.576
 1323    318       1    0.533 0.02030        0.494        0.574
 1327    317       1    0.531 0.02031        0.493        0.572
 1353    316       1    0.529 0.02032        0.491        0.571
 1363    315       1    0.528 0.02032        0.489        0.569
 1375    313       1    0.526 0.02032        0.488        0.567
 1432    312       1    0.524 0.02033        0.486        0.566
 1434    311       1    0.523 0.02033        0.484        0.564
 1436    310       1    0.521 0.02034        0.482        0.562
 1437    309       1    0.519 0.02034        0.481        0.561
 1446    308       1    0.517 0.02035        0.479        0.559
 1447    307       1    0.516 0.02035        0.477        0.557
 1455    306       1    0.514 0.02035        0.476        0.556
 1466    305       1    0.512 0.02036        0.474        0.554
 1475    304       1    0.511 0.02036        0.472        0.552
 1482    303       1    0.509 0.02036        0.471        0.551
 1530    302       1    0.507 0.02036        0.469        0.549
 1535    301       1    0.506 0.02036        0.467        0.547
 1548    300       1    0.504 0.02037        0.466        0.546
 1606    299       1    0.502 0.02037        0.464        0.544
 1656    298       1    0.501 0.02037        0.462        0.542
 1679    297       1    0.499 0.02037        0.461        0.541
 1692    296       1    0.497 0.02037        0.459        0.539
 1723    295       1    0.496 0.02037        0.457        0.537
 1745    294       1    0.494 0.02037        0.456        0.535
 1749    293       1    0.492 0.02037        0.454        0.534
 1759    292       1    0.491 0.02037        0.452        0.532
 1772    291       1    0.489 0.02037        0.450        0.530
 1788    290       1    0.487 0.02037        0.449        0.529
 1790    289       1    0.485 0.02037        0.447        0.527
 1818    284       1    0.484 0.02037        0.445        0.525
 1875    270       1    0.482 0.02037        0.444        0.524
 1896    267       1    0.480 0.02038        0.442        0.522
 1907    263       1    0.478 0.02038        0.440        0.520
 1915    262       1    0.476 0.02038        0.438        0.518
 1950    257       1    0.475 0.02039        0.436        0.516
 1981    252       1    0.473 0.02040        0.434        0.514
 2035    241       1    0.471 0.02040        0.432        0.513
 2036    240       1    0.469 0.02041        0.430        0.511
 2077    235       1    0.467 0.02042        0.428        0.509
 2083    234       1    0.465 0.02043        0.426        0.507
 2085    233       1    0.463 0.02044        0.424        0.505
 2133    211       1    0.461 0.02046        0.422        0.503
 2148    207       1    0.458 0.02049        0.420        0.500
 2171    189       1    0.456 0.02052        0.418        0.498
 2213    165       1    0.453 0.02058        0.415        0.495
 2257    144       1    0.450 0.02068        0.411        0.492
 2284    136       1    0.447 0.02079        0.408        0.489
 2287    135       1    0.443 0.02090        0.404        0.486
 2288    134       1    0.440 0.02100        0.401        0.483
 2351    118       1    0.436 0.02115        0.397        0.480
 2527     84       1    0.431 0.02153        0.391        0.476
 2552     76       1    0.426 0.02198        0.385        0.471
 2695     50       1    0.417 0.02313        0.374        0.465
 2789     28       1    0.402 0.02667        0.353        0.458

                rx=Lev 
 time n.risk n.event survival std.err lower 95% CI upper 95% CI
   19    588       1    0.998 0.00170        0.995        1.000
   24    587       1    0.997 0.00240        0.992        1.000
   28    585       1    0.995 0.00294        0.989        1.000
   35    584       1    0.993 0.00339        0.987        1.000
   38    583       1    0.991 0.00379        0.984        0.999
   56    582       1    0.990 0.00415        0.982        0.998
   62    580       2    0.986 0.00479        0.977        0.996
   72    578       1    0.985 0.00507        0.975        0.995
   77    577       1    0.983 0.00534        0.973        0.993
   78    576       1    0.981 0.00560        0.970        0.992
   80    575       1    0.980 0.00584        0.968        0.991
   85    574       1    0.978 0.00608        0.966        0.990
   91    573       1    0.976 0.00630        0.964        0.989
   93    572       1    0.974 0.00652        0.962        0.987
   98    571       2    0.971 0.00693        0.958        0.985
  100    569       1    0.969 0.00712        0.955        0.983
  105    568       1    0.968 0.00731        0.953        0.982
  111    567       1    0.966 0.00750        0.951        0.981
  113    566       2    0.962 0.00785        0.947        0.978
  116    564       2    0.959 0.00818        0.943        0.975
  119    562       1    0.957 0.00834        0.941        0.974
  121    561       1    0.956 0.00850        0.939        0.972
  122    560       1    0.954 0.00866        0.937        0.971
  129    559       1    0.952 0.00881        0.935        0.970
  133    558       1    0.951 0.00896        0.933        0.968
  136    557       1    0.949 0.00910        0.931        0.967
  141    556       1    0.947 0.00924        0.929        0.965
  145    555       1    0.945 0.00938        0.927        0.964
  146    554       1    0.944 0.00952        0.925        0.963
  147    553       1    0.942 0.00965        0.923        0.961
  150    552       1    0.940 0.00979        0.921        0.960
  157    551       1    0.939 0.00992        0.919        0.958
  165    550       1    0.937 0.01004        0.917        0.957
  169    549       1    0.935 0.01017        0.915        0.955
  171    548       2    0.932 0.01041        0.912        0.952
  174    546       1    0.930 0.01053        0.910        0.951
  175    545       1    0.928 0.01065        0.908        0.949
  176    544       2    0.925 0.01088        0.904        0.947
  179    542       1    0.923 0.01100        0.902        0.945
  181    541       1    0.922 0.01111        0.900        0.944
  183    540       1    0.920 0.01122        0.898        0.942
  185    539       2    0.916 0.01143        0.894        0.939
  189    537       1    0.915 0.01154        0.892        0.938
  191    536       3    0.910 0.01185        0.887        0.933
  196    533       1    0.908 0.01195        0.885        0.932
  204    532       1    0.906 0.01204        0.883        0.930
  206    531       1    0.904 0.01214        0.881        0.929
  216    530       1    0.903 0.01224        0.879        0.927
  218    529       1    0.901 0.01233        0.877        0.926
  219    528       2    0.898 0.01252        0.873        0.923
  222    525       1    0.896 0.01261        0.872        0.921
  224    524       1    0.894 0.01270        0.870        0.919
  226    523       1    0.893 0.01279        0.868        0.918
  229    522       1    0.891 0.01288        0.866        0.916
  230    521       2    0.887 0.01306        0.862        0.913
  232    519       1    0.886 0.01315        0.860        0.912
  235    518       1    0.884 0.01323        0.858        0.910
  246    517       1    0.882 0.01332        0.857        0.909
  250    516       1    0.881 0.01340        0.855        0.907
  257    515       1    0.879 0.01348        0.853        0.906
  258    514       1    0.877 0.01356        0.851        0.904
  260    513       1    0.875 0.01364        0.849        0.903
  262    512       1    0.874 0.01372        0.847        0.901
  263    511       1    0.872 0.01380        0.845        0.899
  274    510       1    0.870 0.01388        0.843        0.898
  276    509       1    0.869 0.01396        0.842        0.896
  279    508       2    0.865 0.01411        0.838        0.893
  283    506       1    0.863 0.01419        0.836        0.892
  286    505       2    0.860 0.01434        0.832        0.889
  290    503       2    0.857 0.01448        0.829        0.885
  294    501       1    0.855 0.01455        0.827        0.884
  300    500       1    0.853 0.01462        0.825        0.882
  313    499       1    0.851 0.01469        0.823        0.881
  314    498       2    0.848 0.01483        0.819        0.878
  316    496       1    0.846 0.01490        0.818        0.876
  323    495       1    0.845 0.01497        0.816        0.874
  325    494       1    0.843 0.01504        0.814        0.873
  330    493       1    0.841 0.01510        0.812        0.871
  333    492       1    0.839 0.01517        0.810        0.870
  335    491       1    0.838 0.01523        0.808        0.868
  336    490       1    0.836 0.01530        0.807        0.867
  337    489       2    0.833 0.01543        0.803        0.863
  342    487       1    0.831 0.01549        0.801        0.862
  343    486       1    0.829 0.01555        0.799        0.860
  348    485       2    0.826 0.01567        0.796        0.857
  349    483       1    0.824 0.01573        0.794        0.856
  352    482       1    0.822 0.01579        0.792        0.854
  355    481       1    0.821 0.01585        0.790        0.852
  356    480       3    0.816 0.01603        0.785        0.848
  362    477       1    0.814 0.01609        0.783        0.846
  366    476       2    0.810 0.01620        0.779        0.843
  370    474       1    0.809 0.01625        0.777        0.841
  372    473       1    0.807 0.01631        0.776        0.840
  376    472       1    0.805 0.01636        0.774        0.838
  382    471       1    0.804 0.01642        0.772        0.836
  386    470       1    0.802 0.01647        0.770        0.835
  389    469       1    0.800 0.01653        0.768        0.833
  402    468       1    0.798 0.01658        0.767        0.832
  406    467       1    0.797 0.01663        0.765        0.830
  413    466       1    0.795 0.01668        0.763        0.828
  415    465       1    0.793 0.01674        0.761        0.827
  420    464       1    0.792 0.01679        0.759        0.825
  422    463       1    0.790 0.01684        0.758        0.824
  429    462       1    0.788 0.01689        0.756        0.822
  430    461       1    0.786 0.01694        0.754        0.820
  438    460       1    0.785 0.01699        0.752        0.819
  439    459       2    0.781 0.01708        0.749        0.816
  440    457       1    0.780 0.01713        0.747        0.814
  443    456       1    0.778 0.01718        0.745        0.812
  454    455       1    0.776 0.01723        0.743        0.811
  458    454       1    0.775 0.01727        0.741        0.809
  465    453       1    0.773 0.01732        0.740        0.808
  472    452       1    0.771 0.01736        0.738        0.806
  474    451       1    0.769 0.01741        0.736        0.804
  475    450       1    0.768 0.01746        0.734        0.803
  476    449       1    0.766 0.01750        0.732        0.801
  482    448       1    0.764 0.01754        0.731        0.799
  486    447       1    0.763 0.01759        0.729        0.798
  490    445       1    0.761 0.01763        0.727        0.796
  491    444       1    0.759 0.01768        0.725        0.795
  498    443       1    0.757 0.01772        0.723        0.793
  499    442       1    0.756 0.01776        0.722        0.791
  504    441       1    0.754 0.01780        0.720        0.790
  505    440       1    0.752 0.01784        0.718        0.788
  511    439       1    0.751 0.01789        0.716        0.786
  512    438       1    0.749 0.01793        0.715        0.785
  513    437       1    0.747 0.01797        0.713        0.783
  522    436       1    0.745 0.01801        0.711        0.782
  525    435       1    0.744 0.01805        0.709        0.780
  527    434       1    0.742 0.01809        0.707        0.778
  532    433       1    0.740 0.01813        0.706        0.777
  546    432       1    0.739 0.01817        0.704        0.775
  548    431       1    0.737 0.01820        0.702        0.773
  553    430       1    0.735 0.01824        0.700        0.772
  559    429       1    0.733 0.01828        0.698        0.770
  560    428       1    0.732 0.01832        0.697        0.769
  565    427       1    0.730 0.01835        0.695        0.767
  573    426       3    0.725 0.01846        0.690        0.762
  578    423       1    0.723 0.01850        0.688        0.760
  580    422       1    0.721 0.01853        0.686        0.759
  582    421       1    0.720 0.01857        0.684        0.757
  583    420       1    0.718 0.01860        0.682        0.755
  589    419       1    0.716 0.01864        0.681        0.754
  593    418       1    0.715 0.01867        0.679        0.752
  599    417       1    0.713 0.01871        0.677        0.750
  602    416       1    0.711 0.01874        0.675        0.749
  608    415       1    0.709 0.01877        0.674        0.747
  613    414       1    0.708 0.01881        0.672        0.746
  615    413       1    0.706 0.01884        0.670        0.744
  628    412       1    0.704 0.01887        0.668        0.742
  629    410       1    0.703 0.01890        0.666        0.741
  638    409       1    0.701 0.01893        0.665        0.739
  642    408       1    0.699 0.01897        0.663        0.737
  643    407       1    0.697 0.01900        0.661        0.736
  647    406       1    0.696 0.01903        0.659        0.734
  654    405       1    0.694 0.01906        0.658        0.732
  663    404       1    0.692 0.01909        0.656        0.731
  664    403       1    0.691 0.01912        0.654        0.729
  668    402       1    0.689 0.01915        0.652        0.727
  669    401       1    0.687 0.01918        0.651        0.726
  672    400       1    0.685 0.01920        0.649        0.724
  675    399       1    0.684 0.01923        0.647        0.722
  678    398       1    0.682 0.01926        0.645        0.721
  680    397       1    0.680 0.01929        0.643        0.719
  684    396       1    0.679 0.01932        0.642        0.717
  697    395       1    0.677 0.01934        0.640        0.716
  706    394       1    0.675 0.01937        0.638        0.714
  708    393       1    0.673 0.01940        0.636        0.712
  709    392       1    0.672 0.01942        0.635        0.711
  717    391       1    0.670 0.01945        0.633        0.709
  720    390       1    0.668 0.01948        0.631        0.708
  723    389       1    0.667 0.01950        0.629        0.706
  729    388       1    0.665 0.01953        0.628        0.704
  730    387       1    0.663 0.01955        0.626        0.703
  739    386       1    0.661 0.01958        0.624        0.701
  742    385       1    0.660 0.01960        0.622        0.699
  743    384       1    0.658 0.01963        0.621        0.698
  751    383       1    0.656 0.01965        0.619        0.696
  755    382       1    0.654 0.01967        0.617        0.694
  759    381       2    0.651 0.01972        0.614        0.691
  764    379       1    0.649 0.01974        0.612        0.689
  766    378       1    0.648 0.01976        0.610        0.688
  797    377       1    0.646 0.01979        0.608        0.686
  806    376       1    0.644 0.01981        0.606        0.684
  828    375       1    0.642 0.01983        0.605        0.683
  833    374       1    0.641 0.01985        0.603        0.681
  846    373       1    0.639 0.01987        0.601        0.679
  851    372       1    0.637 0.01989        0.599        0.678
  858    371       1    0.636 0.01991        0.598        0.676
  875    370       1    0.634 0.01993        0.596        0.674
  883    369       1    0.632 0.01995        0.594        0.672
  890    368       1    0.630 0.01997        0.592        0.671
  891    367       1    0.629 0.01999        0.591        0.669
  900    366       1    0.627 0.02001        0.589        0.667
  902    365       1    0.625 0.02003        0.587        0.666
  905    364       1    0.624 0.02005        0.585        0.664
  909    363       1    0.622 0.02007        0.584        0.662
  922    362       1    0.620 0.02008        0.582        0.661
  931    361       1    0.618 0.02010        0.580        0.659
  938    360       1    0.617 0.02012        0.578        0.657
  939    358       1    0.615 0.02014        0.577        0.656
  940    357       1    0.613 0.02015        0.575        0.654
  942    356       1    0.612 0.02017        0.573        0.652
  944    355       1    0.610 0.02019        0.571        0.651
  952    354       1    0.608 0.02020        0.570        0.649
  959    353       1    0.606 0.02022        0.568        0.647
  960    352       1    0.605 0.02024        0.566        0.646
  961    351       2    0.601 0.02027        0.563        0.642
  968    349       1    0.599 0.02028        0.561        0.641
  969    348       1    0.598 0.02030        0.559        0.639
  986    347       1    0.596 0.02031        0.558        0.637
  997    346       1    0.594 0.02032        0.556        0.635
 1013    345       1    0.593 0.02034        0.554        0.634
 1018    344       1    0.591 0.02035        0.552        0.632
 1026    343       1    0.589 0.02037        0.551        0.630
 1029    342       1    0.587 0.02038        0.549        0.629
 1034    341       1    0.586 0.02039        0.547        0.627
 1037    340       1    0.584 0.02040        0.545        0.625
 1041    339       1    0.582 0.02042        0.544        0.624
 1046    338       1    0.581 0.02043        0.542        0.622
 1052    337       1    0.579 0.02044        0.540        0.620
 1055    336       1    0.577 0.02045        0.538        0.619
 1092    335       1    0.575 0.02046        0.537        0.617
 1103    334       1    0.574 0.02047        0.535        0.615
 1105    332       1    0.572 0.02049        0.533        0.613
 1108    331       1    0.570 0.02050        0.531        0.612
 1112    330       1    0.568 0.02051        0.530        0.610
 1114    329       1    0.567 0.02052        0.528        0.608
 1117    328       1    0.565 0.02053        0.526        0.607
 1122    327       1    0.563 0.02054        0.524        0.605
 1145    326       1    0.562 0.02055        0.523        0.603
 1154    325       1    0.560 0.02056        0.521        0.602
 1161    324       1    0.558 0.02057        0.519        0.600
 1178    323       1    0.556 0.02057        0.517        0.598
 1183    322       1    0.555 0.02058        0.516        0.596
 1186    321       1    0.553 0.02059        0.514        0.595
 1191    320       1    0.551 0.02060        0.512        0.593
 1207    319       1    0.549 0.02061        0.510        0.591
 1211    318       1    0.548 0.02061        0.509        0.590
 1215    317       1    0.546 0.02062        0.507        0.588
 1219    316       1    0.544 0.02063        0.505        0.586
 1262    315       1    0.543 0.02064        0.504        0.585
 1275    314       1    0.541 0.02064        0.502        0.583
 1295    313       1    0.539 0.02065        0.500        0.581
 1298    312       1    0.537 0.02065        0.498        0.579
 1325    311       1    0.536 0.02066        0.497        0.578
 1399    310       1    0.534 0.02067        0.495        0.576
 1405    309       1    0.532 0.02067        0.493        0.574
 1434    308       1    0.530 0.02068        0.491        0.573
 1471    307       1    0.529 0.02068        0.490        0.571
 1509    306       1    0.527 0.02068        0.488        0.569
 1551    303       1    0.525 0.02069        0.486        0.567
 1561    302       1    0.523 0.02069        0.484        0.566
 1564    301       1    0.522 0.02070        0.483        0.564
 1568    300       1    0.520 0.02070        0.481        0.562
 1589    299       1    0.518 0.02071        0.479        0.560
 1606    298       1    0.517 0.02071        0.478        0.559
 1647    297       1    0.515 0.02071        0.476        0.557
 1652    296       1    0.513 0.02072        0.474        0.555
 1687    295       1    0.511 0.02072        0.472        0.554
 1709    294       1    0.510 0.02072        0.471        0.552
 1768    293       1    0.508 0.02072        0.469        0.550
 1829    288       1    0.506 0.02073        0.467        0.548
 1839    285       1    0.504 0.02073        0.465        0.547
 1850    284       1    0.503 0.02073        0.463        0.545
 1851    283       1    0.501 0.02073        0.462        0.543
 1885    278       1    0.499 0.02074        0.460        0.541
 1895    277       1    0.497 0.02074        0.458        0.540
 1918    274       1    0.495 0.02074        0.456        0.538
 1932    272       1    0.494 0.02075        0.454        0.536
 1976    265       1    0.492 0.02075        0.453        0.534
 2012    256       1    0.490 0.02076        0.451        0.532
 2018    255       1    0.488 0.02077        0.449        0.530
 2023    254       1    0.486 0.02077        0.447        0.528
 2067    245       1    0.484 0.02078        0.445        0.526
 2079    242       1    0.482 0.02079        0.443        0.524
 2128    228       1    0.480 0.02081        0.441        0.522
 2152    213       1    0.478 0.02083        0.438        0.520
 2171    206       1    0.475 0.02086        0.436        0.518
 2231    180       1    0.473 0.02091        0.433        0.515
 2458    115       1    0.468 0.02113        0.429        0.512
 2593     72       1    0.462 0.02182        0.421        0.507
 2683     58       1    0.454 0.02285        0.411        0.501
 2718     45       1    0.444 0.02447        0.398        0.495
 2910     16       1    0.416 0.03532        0.352        0.491

                rx=Lev+5FU 
 time n.risk n.event survival std.err lower 95% CI upper 95% CI
    8    578       1    0.998 0.00173        0.995        1.000
    9    577       1    0.997 0.00244        0.992        1.000
   23    576       1    0.995 0.00299        0.989        1.000
   34    574       1    0.993 0.00345        0.986        1.000
   40    573       1    0.991 0.00385        0.984        0.999
   45    572       1    0.990 0.00422        0.981        0.998
   49    570       1    0.988 0.00456        0.979        0.997
   52    569       1    0.986 0.00487        0.977        0.996
   63    568       1    0.984 0.00516        0.974        0.995
   68    567       1    0.983 0.00543        0.972        0.993
   79    566       1    0.981 0.00569        0.970        0.992
   86    565       1    0.979 0.00594        0.968        0.991
   91    564       1    0.977 0.00618        0.965        0.990
  101    563       1    0.976 0.00641        0.963        0.988
  116    562       1    0.974 0.00663        0.961        0.987
  127    561       1    0.972 0.00684        0.959        0.986
  132    560       1    0.971 0.00705        0.957        0.984
  138    559       1    0.969 0.00724        0.955        0.983
  141    558       1    0.967 0.00744        0.953        0.982
  144    557       1    0.965 0.00762        0.950        0.980
  146    556       1    0.964 0.00780        0.948        0.979
  154    555       1    0.962 0.00798        0.946        0.978
  157    554       1    0.960 0.00815        0.944        0.976
  160    553       1    0.958 0.00832        0.942        0.975
  161    552       1    0.957 0.00849        0.940        0.973
  165    551       1    0.955 0.00865        0.938        0.972
  185    550       1    0.953 0.00880        0.936        0.971
  198    549       1    0.951 0.00896        0.934        0.969
  199    548       1    0.950 0.00911        0.932        0.968
  205    547       1    0.948 0.00925        0.930        0.966
  208    546       1    0.946 0.00940        0.928        0.965
  215    545       1    0.944 0.00954        0.926        0.963
  218    544       1    0.943 0.00968        0.924        0.962
  237    543       1    0.941 0.00982        0.922        0.960
  242    542       1    0.939 0.00995        0.920        0.959
  245    541       1    0.938 0.01008        0.918        0.957
  248    540       1    0.936 0.01021        0.916        0.956
  251    539       1    0.934 0.01034        0.914        0.955
  252    538       1    0.932 0.01046        0.912        0.953
  255    537       1    0.931 0.01059        0.910        0.952
  256    536       1    0.929 0.01071        0.908        0.950
  260    535       1    0.927 0.01083        0.906        0.949
  261    534       1    0.925 0.01095        0.904        0.947
  269    533       1    0.924 0.01106        0.902        0.946
  271    532       1    0.922 0.01118        0.900        0.944
  274    531       1    0.920 0.01129        0.898        0.943
  276    530       1    0.918 0.01140        0.896        0.941
  279    529       1    0.917 0.01151        0.894        0.940
  283    528       1    0.915 0.01162        0.892        0.938
  285    527       1    0.913 0.01173        0.891        0.936
  293    526       1    0.911 0.01183        0.889        0.935
  296    525       1    0.910 0.01194        0.887        0.933
  302    524       1    0.908 0.01204        0.885        0.932
  303    523       1    0.906 0.01214        0.883        0.930
  304    522       1    0.905 0.01224        0.881        0.929
  315    521       1    0.903 0.01234        0.879        0.927
  322    520       2    0.899 0.01254        0.875        0.924
  324    518       1    0.898 0.01263        0.873        0.923
  326    517       1    0.896 0.01273        0.871        0.921
  328    515       1    0.894 0.01282        0.869        0.920
  329    514       1    0.892 0.01291        0.867        0.918
  336    513       1    0.891 0.01300        0.866        0.916
  340    512       1    0.889 0.01309        0.864        0.915
  355    510       1    0.887 0.01318        0.862        0.913
  360    508       1    0.885 0.01327        0.860        0.912
  363    507       1    0.884 0.01336        0.858        0.910
  380    506       1    0.882 0.01345        0.856        0.909
  386    505       1    0.880 0.01353        0.854        0.907
  389    504       1    0.878 0.01362        0.852        0.906
  392    503       1    0.877 0.01370        0.850        0.904
  393    502       1    0.875 0.01379        0.848        0.902
  400    501       1    0.873 0.01387        0.846        0.901
  405    500       1    0.871 0.01395        0.845        0.899
  408    499       1    0.870 0.01403        0.843        0.898
  415    498       1    0.868 0.01411        0.841        0.896
  422    497       1    0.866 0.01419        0.839        0.894
  428    496       1    0.864 0.01427        0.837        0.893
  430    495       1    0.863 0.01435        0.835        0.891
  431    494       1    0.861 0.01443        0.833        0.890
  434    493       1    0.859 0.01450        0.831        0.888
  441    492       1    0.857 0.01458        0.829        0.887
  443    491       1    0.856 0.01465        0.827        0.885
  448    490       2    0.852 0.01480        0.824        0.882
  449    488       1    0.850 0.01487        0.822        0.880
  454    487       2    0.847 0.01501        0.818        0.877
  458    485       1    0.845 0.01508        0.816        0.875
  460    484       1    0.843 0.01515        0.814        0.874
  466    483       2    0.840 0.01529        0.811        0.871
  484    481       1    0.838 0.01536        0.809        0.869
  485    480       1    0.837 0.01542        0.807        0.867
  491    479       1    0.835 0.01549        0.805        0.866
  497    478       1    0.833 0.01556        0.803        0.864
  498    477       1    0.831 0.01562        0.801        0.862
  503    476       1    0.830 0.01569        0.799        0.861
  510    475       1    0.828 0.01575        0.797        0.859
  526    474       1    0.826 0.01581        0.796        0.858
  529    473       1    0.824 0.01588        0.794        0.856
  536    472       1    0.823 0.01594        0.792        0.854
  543    471       1    0.821 0.01600        0.790        0.853
  550    470       1    0.819 0.01606        0.788        0.851
  554    469       2    0.816 0.01618        0.784        0.848
  576    467       1    0.814 0.01624        0.783        0.846
  578    466       2    0.810 0.01636        0.779        0.843
  580    464       1    0.809 0.01642        0.777        0.841
  591    463       1    0.807 0.01647        0.775        0.840
  592    462       1    0.805 0.01653        0.773        0.838
  593    461       1    0.803 0.01659        0.771        0.837
  594    460       1    0.802 0.01664        0.770        0.835
  601    459       1    0.800 0.01670        0.768        0.833
  602    458       1    0.798 0.01675        0.766        0.832
  603    457       1    0.796 0.01680        0.764        0.830
  604    456       1    0.795 0.01686        0.762        0.828
  609    455       1    0.793 0.01691        0.760        0.827
  614    454       1    0.791 0.01696        0.759        0.825
  616    453       2    0.788 0.01707        0.755        0.822
  617    451       1    0.786 0.01712        0.753        0.820
  622    450       1    0.784 0.01717        0.751        0.819
  636    449       1    0.782 0.01722        0.749        0.817
  641    448       1    0.781 0.01727        0.748        0.815
  642    447       1    0.779 0.01732        0.746        0.814
  649    446       1    0.777 0.01737        0.744        0.812
  657    445       1    0.775 0.01742        0.742        0.810
  666    444       1    0.774 0.01747        0.740        0.809
  674    443       1    0.772 0.01751        0.738        0.807
  683    442       1    0.770 0.01756        0.736        0.805
  692    441       2    0.767 0.01765        0.733        0.802
  693    439       1    0.765 0.01770        0.731        0.800
  696    438       1    0.763 0.01775        0.729        0.799
  701    437       1    0.761 0.01779        0.727        0.797
  711    436       1    0.760 0.01783        0.726        0.795
  712    435       1    0.758 0.01788        0.724        0.794
  736    434       1    0.756 0.01792        0.722        0.792
  765    433       1    0.754 0.01797        0.720        0.790
  802    432       2    0.751 0.01805        0.716        0.787
  805    430       1    0.749 0.01809        0.715        0.786
  806    429       1    0.747 0.01814        0.713        0.784
  811    428       1    0.746 0.01818        0.711        0.782
  827    427       1    0.744 0.01822        0.709        0.781
  844    426       1    0.742 0.01826        0.707        0.779
  849    424       1    0.740 0.01830        0.705        0.777
  853    423       1    0.739 0.01834        0.704        0.776
  862    422       1    0.737 0.01838        0.702        0.774
  884    421       1    0.735 0.01842        0.700        0.772
  887    419       2    0.732 0.01850        0.696        0.769
  904    417       1    0.730 0.01854        0.694        0.767
  905    416       1    0.728 0.01858        0.693        0.766
  911    415       1    0.726 0.01861        0.691        0.764
  916    414       1    0.725 0.01865        0.689        0.762
  918    413       1    0.723 0.01869        0.687        0.760
  934    412       1    0.721 0.01873        0.685        0.759
  936    411       1    0.719 0.01876        0.684        0.757
  961    410       1    0.718 0.01880        0.682        0.755
  968    409       1    0.716 0.01883        0.680        0.754
  977    408       1    0.714 0.01887        0.678        0.752
  993    407       1    0.712 0.01890        0.676        0.750
 1022    406       1    0.711 0.01894        0.674        0.749
 1024    405       1    0.709 0.01897        0.673        0.747
 1025    404       1    0.707 0.01901        0.671        0.745
 1032    403       1    0.705 0.01904        0.669        0.744
 1037    402       1    0.704 0.01907        0.667        0.742
 1122    401       1    0.702 0.01911        0.665        0.740
 1138    400       1    0.700 0.01914        0.664        0.739
 1142    399       1    0.698 0.01917        0.662        0.737
 1145    398       1    0.697 0.01920        0.660        0.735
 1151    397       1    0.695 0.01924        0.658        0.734
 1159    396       1    0.693 0.01927        0.656        0.732
 1193    395       1    0.691 0.01930        0.655        0.730
 1201    394       1    0.690 0.01933        0.653        0.729
 1212    393       1    0.688 0.01936        0.651        0.727
 1233    392       1    0.686 0.01939        0.649        0.725
 1246    391       1    0.684 0.01942        0.647        0.723
 1276    390       2    0.681 0.01948        0.644        0.720
 1277    388       1    0.679 0.01951        0.642        0.718
 1279    387       1    0.677 0.01953        0.640        0.717
 1302    384       1    0.676 0.01956        0.638        0.715
 1306    383       1    0.674 0.01959        0.636        0.713
 1329    382       1    0.672 0.01962        0.635        0.712
 1365    381       1    0.670 0.01965        0.633        0.710
 1387    380       1    0.668 0.01967        0.631        0.708
 1388    379       1    0.667 0.01970        0.629        0.706
 1424    376       1    0.665 0.01973        0.627        0.705
 1439    375       1    0.663 0.01975        0.626        0.703
 1446    374       1    0.661 0.01978        0.624        0.701
 1488    371       1    0.660 0.01981        0.622        0.700
 1495    370       1    0.658 0.01983        0.620        0.698
 1511    369       1    0.656 0.01986        0.618        0.696
 1521    368       1    0.654 0.01989        0.616        0.694
 1550    367       1    0.652 0.01991        0.615        0.693
 1607    365       1    0.651 0.01994        0.613        0.691
 1620    363       1    0.649 0.01996        0.611        0.689
 1637    362       1    0.647 0.01999        0.609        0.687
 1644    361       1    0.645 0.02001        0.607        0.686
 1668    360       2    0.642 0.02006        0.604        0.682
 1671    358       1    0.640 0.02009        0.602        0.681
 1723    357       1    0.638 0.02011        0.600        0.679
 1743    356       1    0.636 0.02013        0.598        0.677
 1752    355       1    0.635 0.02016        0.596        0.675
 1767    354       1    0.633 0.02018        0.594        0.674
 1783    353       1    0.631 0.02020        0.593        0.672
 1786    352       1    0.629 0.02022        0.591        0.670
 1798    351       1    0.627 0.02024        0.589        0.668
 1812    348       1    0.626 0.02027        0.587        0.667
 1831    339       1    0.624 0.02029        0.585        0.665
 1856    335       1    0.622 0.02031        0.583        0.663
 1876    329       1    0.620 0.02034        0.581        0.661
 1995    313       1    0.618 0.02037        0.579        0.659
 2021    304       1    0.616 0.02041        0.577        0.657
 2028    301       1    0.614 0.02044        0.575        0.655
 2031    298       1    0.612 0.02048        0.573        0.653
 2052    291       1    0.610 0.02051        0.571        0.651
 2074    283       1    0.608 0.02055        0.569        0.649
 2127    265       1    0.605 0.02060        0.566        0.647
 2174    247       1    0.603 0.02067        0.564        0.645
 2197    229       1    0.600 0.02074        0.561        0.642
 2318    184       1    0.597 0.02088        0.557        0.639
 2482    135       1    0.593 0.02119        0.552        0.636
 2542     99       1    0.587 0.02181        0.545        0.631
 2725     64       1    0.577 0.02331        0.533        0.625

Logrank test

구간별로 예상/기대 발생 수 계산 후 합쳐서 카이제곱검정

survdiff(Surv(time, status) ~ rx, data = colon)
Call:
survdiff(formula = Surv(time, status) ~ rx, data = colon)

             N Observed Expected (O-E)^2/E (O-E)^2/V
rx=Obs     610      336      288      8.12     12.11
rx=Lev     588      310      279      3.37      4.95
rx=Lev+5FU 578      230      309     20.20     31.28

 Chisq= 31.8  on 2 degrees of freedom, p= 1e-07 

각 구간들의 결과를 합친다?

  • 구간별 발생 양상이 비슷하다는 가정 (비례위험(proportional hazards) 가정)

Cox model

Hazard function: \(h(t)\)

  • \(t\) 까진 생존하고 \(t\) 직후에 사망할 가능성

Cox model: Hazard Ratio(HR) 을 평가

\[ \begin{aligned} h(t) &= \exp({\beta_0 + \beta_1 X_1 + \beta_2 X_2 + \cdots}) \\\\ &= h_0(t) \exp({\beta_1 X_1 + \beta_2 X_2 + \cdots}) \end{aligned} \] \(X_1\) 1 증가할 때 \(h(t)\)\(\exp(\beta_1)\) 배 증가. 즉

\[\text{HR} = \exp{(\beta_1)}\]

특징

Kaplan-meier 와 마찬가지로 구간별로 통계량을 계산.

  • 구간별 양상 비슷하다는 비례위험가정

Time independent HR: 시간은 \(h_0(t)\) 에만.

  • 모형이 심플: HR 값이 시간에 상관없이 일정함
  • Time dependent cox 도 가능.

\(h_0(t)\) 는 구하지 않는다. 계산 간단해지는 장점

  • Cox 가 준모수(semi-parametric) 방법이라고 불리는 이유
  • 예측모형 만들땐 문제. \(h_0(t)\) 를 따로 얻어야 함.

cox 2

summary(coxph(Surv(time, status) ~ sex + age + rx, data = colon))
Call:
coxph(formula = Surv(time, status) ~ sex + age + rx, data = colon)

  n= 1776, number of events= 876 

               coef exp(coef)  se(coef)      z Pr(>|z|)    
sex       -0.072247  0.930301  0.067646 -1.068    0.286    
age       -0.001144  0.998857  0.002876 -0.398    0.691    
rxLev     -0.049102  0.952084  0.078788 -0.623    0.533    
rxLev+5FU -0.452209  0.636221  0.085709 -5.276 1.32e-07 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

          exp(coef) exp(-coef) lower .95 upper .95
sex          0.9303      1.075    0.8148    1.0622
age          0.9989      1.001    0.9932    1.0045
rxLev        0.9521      1.050    0.8159    1.1111
rxLev+5FU    0.6362      1.572    0.5378    0.7526

Concordance= 0.55  (se = 0.01 )
Likelihood ratio test= 34.51  on 4 df,   p=6e-07
Wald test            = 32.59  on 4 df,   p=1e-06
Score (logrank) test = 33.07  on 4 df,   p=1e-06

cox 3

생존분석: 비례위험가정

트렌드 일정하다는 가정: 생존곡선 겹치면 안됨

  • 비례위험가정 test까진 필요없음: 그림으로 확인

Landmark-analysis

시간 나눠 따로 분석

Time-dependent cox

Time-dependent cox 2

Call:
coxph(formula = Surv(tstart, time, status) ~ trt + prior + karno:strata(tgroup), 
    data = vet2)

  n= 225, number of events= 128 

                                  coef exp(coef)  se(coef)      z Pr(>|z|)    
trt                          -0.011025  0.989035  0.189062 -0.058    0.953    
prior                        -0.006107  0.993912  0.020355 -0.300    0.764    
karno:strata(tgroup)tgroup=1 -0.048755  0.952414  0.006222 -7.836 4.64e-15 ***
karno:strata(tgroup)tgroup=2  0.008050  1.008083  0.012823  0.628    0.530    
karno:strata(tgroup)tgroup=3 -0.008349  0.991686  0.014620 -0.571    0.568    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

                             exp(coef) exp(-coef) lower .95 upper .95
trt                             0.9890      1.011    0.6828    1.4327
prior                           0.9939      1.006    0.9550    1.0344
karno:strata(tgroup)tgroup=1    0.9524      1.050    0.9409    0.9641
karno:strata(tgroup)tgroup=2    1.0081      0.992    0.9831    1.0337
karno:strata(tgroup)tgroup=3    0.9917      1.008    0.9637    1.0205

Concordance= 0.725  (se = 0.024 )
Likelihood ratio test= 63.04  on 5 df,   p=3e-12
Wald test            = 63.7  on 5 df,   p=2e-12
Score (logrank) test = 71.33  on 5 df,   p=5e-14

Time-dependent covariate

생존분석 모든 변수는 Index date 이전에 측정해야

  • 예) F/U lab, medication

Time-dependent covariate 다루려면 이를 고려한 cox 필요

Executive Summary

Dafault Repeated measure Survey
Continuous linear regression GEE Survey GLM
Event GLM (logistic) GEE Survey GLM
Time & Event Cox marginal Cox Survey Cox
0,1,2,3 (rare event) GLM (poisson) GEE Survey GLM

END