Published on :
Statistical INTERNAL_CREATION

Example 2 PROC ICLIFETEST - Cosmetic Data

This code is also available in: Deutsch Español Français
Awaiting validation
This script analyzes the cosmetic effects of two breast cancer treatments (Radiotherapy 'RT' vs Radio-chemotherapy 'RCT'). It creates the data via DATA steps, then uses the ICLIFETEST procedure to estimate survival functions, perform comparisons between groups (strata), and generate survival plots with confidence intervals. The 'impute' option is used to handle interval censoring via multiple imputation.
Data Analysis

Type : INTERNAL_CREATION


Data is created directly in the script via the DATALINES statement. Two tables (RT and RCT) are created then concatenated into the final BCS table.

1 Code Block
DATA STEP Data
Explanation :
Creation of raw datasets for each treatment group. The 'input lTime rTime @code_sas_json/8_SAS_Intro_ReadFile_MultiCol_@@.json;' statement (corrected from the prompt's artifact) allows reading multiple pairs of observations on the same line. The two tables are then stacked into the 'BCS' table.
Copied!
1DATA RT;
2 INPUT lTime rTime @code_sas_json/8_SAS_Intro_ReadFile_MultiCol_@@.json;
3 trt = ' RT';
4 DATALINES;
545 . 25 37 37 .
6 6 10 46 . 0 5
7 0 7 26 40 18 .
846 . 46 . 24 .
946 . 27 34 36 .
10 7 16 36 44 5 11
1117 . 46 . 19 35
12 7 14 36 48 17 25
1337 44 37 . 24 .
14 0 8 40 . 32 .
15 4 11 17 25 33 .
1615 . 46 . 19 26
1711 15 11 18 37 .
1822 . 38 . 34 .
1946 . 5 12 36 .
2046 .
21;
22 
23DATA RCT;
24 INPUT lTime rTime @code_sas_json/8_SAS_Intro_ReadFile_MultiCol_@@.json;
25 trt = 'RCT';
26 DATALINES;
27 8 12 0 5 30 34
28 0 22 5 8 13 .
2924 31 12 20 10 17
3017 27 11 . 8 21
3117 23 33 40 4 9
3224 30 31 . 11 .
3316 24 13 39 14 19
3413 . 19 32 4 8
3511 13 34 . 34 .
3616 20 13 . 30 36
3718 25 16 24 18 24
3817 26 35 . 16 60
3932 . 15 22 35 39
4023 . 11 17 21 .
4144 48 22 32 11 20
4214 17 10 35 48 .
43;
44 
45DATA BCS;
46 SET RT RCT;
47RUN;
2 Code Block
PROC ICLIFETEST
Explanation :
First survival analysis. The 'plots=survival(cl)' option requests plotting the survival curve with confidence limits. 'impute(seed=1234)' activates imputation for interval-censored data with a fixed random seed for reproducibility. 'strata trt' defines the group variable.
Copied!
1PROC ICLIFETEST DATA=BCS plots=survival(cl) impute(seed=1234);
2 strata trt;
3 time (lTime, rTime);
4RUN;
3 Code Block
PROC ICLIFETEST
Explanation :
Second analysis similar to the first, but the graphic option 'nodash' is added so that confidence curves are plotted with solid lines rather than dashed lines.
Copied!
1PROC ICLIFETEST DATA=BCS plots=survival(cl nodash) impute(seed=1234);
2 strata trt;
3 time (lTime, rTime);
4RUN;
4 Code Block
PROC ICLIFETEST
Explanation :
Third analysis. The 'strata=panel' option requests separating the plots of each stratum (treatment group) into distinct panels.
Copied!
1PROC ICLIFETEST DATA=BCS plots=survival(cl strata=panel) impute(seed=1234);
2 strata trt;
3 time (lTime, rTime);
4RUN;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
Copyright Info : SAS SAMPLE LIBRARY, NAME: ICLFTEX2, PRODUCT: STAT