/* PubH 7450 Exampel 7.4: Stratified two-sample tests for the bone marrow transplant data; see p.213 and p.221. */ options ls=80 center pagesize=60 number label; goptions device = PS; /* graphs are saved in a file names sasgraph.ps */ data bmt; infile '/home/merganser/weip/public_html/course/7450/data/bmt.txt' firstobs=87; input grp T1 T2 d1 d2 d3 Ta da Tc dc Tp dp Z1-Z10; proc lifetest method=km plots=(s); strata grp / test=(logrank wilcoxon tarone peto modpeto fleming(.5,2) ); time T2*d3(0) ; title 'Unstratified tests'; proc lifetest method=km plots=(s); strata Z10 / test=(logrank wilcoxon tarone peto modpeto fleming(.5,2) ) GROUP=grp; time T2*d3(0) ; title 'Stratified on the use of MTX'; /* to explore further, first, look at subgroup analysis: */ data bmtZ10eq0; set bmt; where Z10=0; data bmtZ10eq1; set bmt; where Z10=1; proc lifetest method=km plots=(s) data=bmtZ10eq0; strata grp / test=(logrank wilcoxon tarone peto modpeto fleming(.5,2) ); time T2*d3(0) ; title 'Subgroup tests for Z10=0'; proc lifetest method=km plots=(s) data=bmtZ10eq1; strata grp / test=(logrank wilcoxon tarone peto modpeto fleming(.5,2) ); time T2*d3(0) ; title 'Subgroup tests for Z10=1'; /* second, any assoc b/w Z10 and grp? */ proc freq data=bmt; table Z10*grp / chisq exact; title 'Z10 vs grp'; ************************** Unstratified tests 1 Testing Homogeneity of Survival Curves for T2 over Strata Rank Statistics Modified grp Log-Rank Wilcoxon Tarone Peto Peto Fleming 1 2.148 131.0 17.5 0.936 0.921 0.354 2 -14.966 -1556.0 -153.1 -11.139 -11.042 -0.923 3 12.818 1425.0 135.6 10.203 10.121 0.570 Covariance Matrix for the Log-Rank Statistics grp 1 2 3 1 15.9552 -10.3451 -5.6101 2 -10.3451 20.3398 -9.9947 3 -5.6101 -9.9947 15.6048 Covariance Matrix for the Wilcoxon Statistics grp 1 2 3 1 159851 -98848 -61003 2 -98848 195977 -97129 3 -61003 -97129 158131 Covariance Matrix for the Tarone Statistics grp 1 2 3 1 1548.71 -979.36 -569.35 2 -979.36 1924.87 -945.51 3 -569.35 -945.51 1514.86 Covariance Matrix for the Peto Statistics grp 1 2 3 1 8.4262 -5.2177 -3.2085 2 -5.2177 10.3681 -5.1504 3 -3.2085 -5.1504 8.3589 Covariance Matrix for the Modified Peto Statistics grp 1 2 3 1 8.2646 -5.1153 -3.1493 2 -5.1153 10.1617 -5.0464 3 -3.1493 -5.0464 8.1956 Covariance Matrix for the Fleming Statistics grp 1 2 3 1 0.189344 -.135783 -.053561 2 -.135783 0.267981 -.132198 3 -.053561 -.132198 0.185760 Test of Equality over Strata Pr > Test Chi-Square DF Chi-Square Log-Rank 13.8037 2 0.0010 Wilcoxon 16.2407 2 0.0003 Tarone 15.6529 2 0.0004 Peto 15.7260 2 0.0004 Modified Peto 15.7781 2 0.0004 Fleming(0.5,2) 3.2893 2 0.1931 ************************** Stratified on the use of MTX 9 Stratified Comparison of Survival Curves for T2 over Group Rank Statistics Modified grp Log-Rank Wilcoxon Tarone Peto Peto Fleming 1 0.778 -83.0 -2.8 -0.570 -0.593 0.468 2 -13.728 -937.0 -111.4 -10.043 -9.883 -0.935 3 12.950 1020.0 114.1 10.612 10.477 0.467 Covariance Matrix for the Log-Rank Statistics grp 1 2 3 1 15.9105 -9.9827 -5.9278 2 -9.9827 19.5889 -9.6062 3 -5.9278 -9.6062 15.5340 Covariance Matrix for the Wilcoxon Statistics grp 1 2 3 1 54503.7 -34806.2 -19697.5 2 -34806.2 73786.4 -38980.2 3 -19697.5 -38980.2 58677.7 Covariance Matrix for the Tarone Statistics grp 1 2 3 1 844.30 -537.89 -306.40 2 -537.89 1101.43 -563.53 3 -306.40 -563.53 869.94 Covariance Matrix for the Peto Statistics grp 1 2 3 1 8.22319 -4.96775 -3.25543 2 -4.96775 9.92350 -4.95575 3 -3.25543 -4.95575 8.21118 Covariance Matrix for the Modified Peto Statistics grp 1 2 3 1 7.88998 -4.77165 -3.11834 2 -4.77165 9.55127 -4.77963 3 -3.11834 -4.77963 7.89797 Covariance Matrix for the Fleming Statistics grp 1 2 3 1 0.194429 -.132570 -.061859 2 -.132570 0.256945 -.124375 3 -.061859 -.124375 0.186234 Stratified Test of Equality over Group Pr > Test Chi-Square DF Chi-Square Log-Rank 13.1932 2 0.0014 Wilcoxon 19.1358 2 <.0001 Tarone 16.8769 2 0.0002 Peto 15.6245 2 0.0004 Modified Peto 15.7823 2 0.0004 Fleming(0.5,2) 3.4032 2 0.1824 ************************* Subgroup tests for Z10=0 16 Testing Homogeneity of Survival Curves for T2 over Strata Rank Statistics Modified grp Log-Rank Wilcoxon Tarone Peto Peto Fleming 1 -0.504 -103.00 -8.03 -1.049 -1.043 0.198 2 -11.235 -892.00 -100.53 -8.970 -8.867 -0.491 3 11.739 995.00 108.57 10.019 9.910 0.293 Covariance Matrix for the Log-Rank Statistics grp 1 2 3 1 9.6771 -6.5535 -3.1236 2 -6.5535 13.9816 -7.4281 3 -3.1236 -7.4281 10.5517 Covariance Matrix for the Wilcoxon Statistics grp 1 2 3 1 49366.6 -32120.6 -17246.0 2 -32120.6 69388.9 -37268.2 3 -17246.0 -37268.2 54514.2 Covariance Matrix for the Tarone Statistics grp 1 2 3 1 671.590 -445.561 -226.029 2 -445.561 950.419 -504.858 3 -226.029 -504.858 730.887 Covariance Matrix for the Peto Statistics grp 1 2 3 1 5.18249 -3.37715 -1.80534 2 -3.37715 7.31834 -3.94119 3 -1.80534 -3.94119 5.74653 Covariance Matrix for the Modified Peto Statistics grp 1 2 3 1 5.04354 -3.28484 -1.75870 2 -3.28484 7.11594 -3.83109 3 -1.75870 -3.83109 5.58979 Covariance Matrix for the Fleming Statistics grp 1 2 3 1 0.103542 -.075998 -.027543 2 -.075998 0.163963 -.087964 3 -.027543 -.087964 0.115508 Test of Equality over Strata Pr > Test Chi-Square DF Chi-Square Log-Rank 14.0685 2 0.0009 Wilcoxon 19.1822 2 <.0001 Tarone 17.2104 2 0.0002 Peto 18.4208 2 <.0001 Modified Peto 18.5293 2 <.0001 Fleming(0.5,2) 1.4820 2 0.4766 *************************** Subgroup tests for Z10=1 23 Testing Homogeneity of Survival Curves for T2 over Strata Rank Statistics Modified grp Log-Rank Wilcoxon Tarone Peto Peto Fleming 1 1.2816 20.000 5.280 0.4791 0.4499 0.2700 2 -2.4929 -45.000 -10.844 -1.0729 -1.0161 -0.4441 3 1.2113 25.000 5.564 0.5938 0.5662 0.1741 Covariance Matrix for the Log-Rank Statistics grp 1 2 3 1 6.23336 -3.42915 -2.80422 2 -3.42915 5.60732 -2.17818 3 -2.80422 -2.17818 4.98239 Covariance Matrix for the Wilcoxon Statistics grp 1 2 3 1 5137.13 -2685.56 -2451.56 2 -2685.56 4397.50 -1711.94 3 -2451.56 -1711.94 4163.50 Covariance Matrix for the Tarone Statistics grp 1 2 3 1 172.706 -92.331 -80.375 2 -92.331 151.007 -58.675 3 -80.375 -58.675 139.050 Covariance Matrix for the Peto Statistics grp 1 2 3 1 3.04070 -1.59061 -1.45009 2 -1.59061 2.60516 -1.01455 3 -1.45009 -1.01455 2.46464 Covariance Matrix for the Modified Peto Statistics grp 1 2 3 1 2.84644 -1.48680 -1.35964 2 -1.48680 2.43533 -0.94853 3 -1.35964 -0.94853 2.30817 Covariance Matrix for the Fleming Statistics grp 1 2 3 1 0.090887 -.056571 -.034316 2 -.056571 0.092982 -.036411 3 -.034316 -.036411 0.070726 Test of Equality over Strata Pr > Test Chi-Square DF Chi-Square Log-Rank 1.1226 2 0.5705 Wilcoxon 0.4765 2 0.7880 Tarone 0.7943 2 0.6722 Peto 0.4568 2 0.7958 Modified Peto 0.4389 2 0.8030 Fleming(0.5,2) 2.1214 2 0.3462 ************************* Z10 vs grp 28 Table of Z10 by grp Z10 grp Frequency| Percent | Row Pct | Col Pct | 1| 2| 3| Total ---------+--------+--------+--------+ 0 | 21 | 42 | 34 | 97 | 15.33 | 30.66 | 24.82 | 70.80 | 21.65 | 43.30 | 35.05 | | 55.26 | 77.78 | 75.56 | ---------+--------+--------+--------+ 1 | 17 | 12 | 11 | 40 | 12.41 | 8.76 | 8.03 | 29.20 | 42.50 | 30.00 | 27.50 | | 44.74 | 22.22 | 24.44 | ---------+--------+--------+--------+ Total 38 54 45 137 27.74 39.42 32.85 100.00 Statistics for Table of Z10 by grp Statistic DF Value Prob ------------------------------------------------------ Chi-Square 2 6.2014 0.0450 Likelihood Ratio Chi-Square 2 5.9515 0.0510 Fisher's Exact Test ---------------------------------- Table Probability (P) 0.0016 Pr <= P 0.0517