| 1 | DATA control; /*create data set for untreated group*/ |
| 2 | INPUT time censor; |
| 3 | trt='control'; /*Correction de 'controp' en 'control' pour cohérence avec le commentaire*/ |
| 4 | DATALINES; |
| 5 | 20 1 21 1 23 1 24 1 24 1 26 1 26 1 27 1 28 1 30 |
| 6 | ; |
| 7 |
| 1 | DATA rad; /*create data set for the radiated group*/ |
| 2 | INPUT time censor; |
| 3 | trt='rad'; |
| 4 | DATALINES; |
| 5 | 26 1 28 1 29 1 29 1 30 1 30 1 31 1 31 1 32 1 35 0 |
| 6 | ; |
| 7 |
| 1 | DATA radbpa; /*Create data set for the raduated + BPA group*/ |
| 2 | INPUT time censor; |
| 3 | trt='radbpa'; |
| 4 | DATALINES; |
| 5 | 31 1 32 1 34 1 35 1 36 1 38 1 38 1 39 1 42 0 42 0 |
| 6 | ; |
| 7 |
| 1 | DATA prob7_7; SET control rad radbpa; /*Combine all these three samples*/ |
| 2 | grp1=(trt='rad'); |
| 3 | grp2=(trt='radbpa'); |
| 4 | title 'Problem 7_7, page 240 --Boron neutron capture therapy'; |
| 5 | title3 'grp1=rad, grp2=radbpa'; |
| 6 | ; |
| 1 | PROC PRINT; |
| 1 | /*Compare three groups, plot the survival functions and hazard functions*/ |
| 2 | PROC LIFETEST DATA=prob7_7 plots=(s,h) graphics; |
| 3 | time time*censor(0); |
| 4 | strata trt/adjust=bon; |
| 5 | symbol1 v=none color=black line=1; |
| 6 | symbol2 v=none color=black line=2; |
| 7 | symbol3 v=none color=black line=3; |
| 8 | RUN; |