1 The SAS System 00:01 Saturday, August 19, 2000 NOTE: Copyright (c) 1999-2000 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software Release 8.1 (TS1M0) Licensed to UNC-CHAPEL HILL - CAMPUSWIDE INTERNAL, Site 0039466001. NOTE: This session is executing on the WIN_NT platform. NOTE: SAS initialization used: real time 0.40 seconds cpu time 0.24 seconds 1 TITLE1 "P0104.SAS-Create file using only one benign or malig per 1 ! case"; 2 3 LIBNAME INOUT01 "..\DATA\"; NOTE: Libref INOUT01 was successfully assigned as follows: Engine: V612 Physical Name: D:\KEM\TEACHING\BIOS262\2000\HOMEWORK\DATA 4 5 DATA ONE TWO; 6 LENGTH DEFAULT=4; 7 SET INOUT01.P0103; 8 NOTMISSB = (DLOG_B_1^=.) ; *Indicator (1,0) for not missing benign; 9 NOTMISSM = (DLOG_M_1^=.) ; *Indicator (1,0) for not missing malign; 10 NOTMISS=NOTMISSB*NOTMISSM; *If have both benign and malign NOTMISS=1; 11 IF NOTMISS THEN DO; 12 U=UNIFORM(24647); 13 OUTPUT ONE; 14 END; 15 ELSE OUTPUT TWO; 16 17 *Randomly order cases with both malign and benign areas; 18 *1/3 uses only malign data, other 2 use only benign data; NOTE: There were 10 observations read from the data set INOUT01.P0103. NOTE: The data set WORK.ONE has 3 observations and 18 variables. NOTE: The data set WORK.TWO has 7 observations and 18 variables. NOTE: DATA statement used: real time 0.04 seconds cpu time 0.04 seconds 19 PROC SORT DATA=ONE 20 OUT=THREE; 21 BY U; 22 NOTE: There were 3 observations read from the data set WORK.ONE. NOTE: The data set WORK.THREE has 3 observations and 18 variables. NOTE: PROCEDURE SORT used: 2 The SAS System 00:01 Saturday, August 19, 2000 real time 0.01 seconds cpu time 0.01 seconds 23 DATA FOUR; 24 LENGTH DEFAULT=4; 25 SET THREE 26 TWO ; 27 IF NOTMISS THEN MALIGN=(_N_=1); 28 ELSE MALIGN=NOTMISSM; 29 BENIGN=1-MALIGN; 30 IF MALIGN THEN DO; 31 DLOGROI1=DLOG_M_1; 32 DLOGROI2=DLOG_M_2; 33 DLOGROI3=DLOG_M_3; 34 OUTPUT; 35 END; 36 ELSE DO; 37 DLOGROI1=DLOG_B_1; 38 DLOGROI2=DLOG_B_2; 39 DLOGROI3=DLOG_B_3; 40 OUTPUT; 41 END; 42 LABEL DLOGROI1="Dif log ROI 45sec" 43 DLOGROI2="Dif log ROI 90sec" 44 DLOGROI3="Dif log ROI 135sec" 45 DLOG_F_1="Dif log Fat 45sec" 46 DLOG_F_2="Dif log Fat 90sec" 47 DLOG_F_3="Dif log Fat 135sec" 48 DLOG_P_1="Dif log Parenchyma 45sec" 49 DLOG_P_2="Dif log Parenchyma 90sec" 50 DLOG_P_3="Dif log Parenchyma 135sec" 51 BENIGN ="1=> Benign, else 0" 52 MALIGN ="1=> Malign, else 0"; 53 FORMAT DLOGROI1--DLOGROI3 6.3; 54 KEEP ID DLOG_F_1-DLOG_F_3 55 DLOG_P_1-DLOG_P_3 56 DLOGROI1-DLOGROI3 CONSTANT BENIGN MALIGN; 57 NOTE: There were 3 observations read from the data set WORK.THREE. NOTE: There were 7 observations read from the data set WORK.TWO. NOTE: The data set WORK.FOUR has 10 observations and 13 variables. NOTE: DATA statement used: real time 0.02 seconds cpu time 0.02 seconds 58 PROC SORT DATA=FOUR 59 OUT =INOUT01.P0104; 3 The SAS System 00:01 Saturday, August 19, 2000 60 BY MALIGN; 61 62 NOTE: There were 10 observations read from the data set WORK.FOUR. NOTE: The data set INOUT01.P0104 has 10 observations and 13 variables. NOTE: PROCEDURE SORT used: real time 0.02 seconds cpu time 0.02 seconds 63 PROC PRINT DATA=INOUT01.P0104 UNIFORM; 64 VAR ID DLOG_F_1-DLOG_F_3 65 DLOG_P_1-DLOG_P_3 66 DLOGROI1-DLOGROI3 CONSTANT BENIGN MALIGN; 67 TITLE2 "All variables in file"; 68 69 NOTE: There were 10 observations read from the data set INOUT01.P0104. NOTE: The PROCEDURE PRINT printed page 1. NOTE: PROCEDURE PRINT used: real time 0.03 seconds cpu time 0.03 seconds 70 PROC MEANS DATA=INOUT01.P0104 MEAN STD N NMISS MIN MAX MAXDEC=3; 71 VAR ID DLOG_F_1-DLOG_F_3 72 DLOG_P_1-DLOG_P_3 73 DLOGROI1-DLOGROI3 CONSTANT BENIGN MALIGN; 74 TITLE2 "All variables in file"; 75 76 NOTE: There were 10 observations read from the data set INOUT01.P0104. NOTE: The PROCEDURE MEANS printed page 2. NOTE: PROCEDURE MEANS used: real time 0.02 seconds cpu time 0.02 seconds 77 PROC PRINT DATA=INOUT01.P0104 UNIFORM; 78 VAR ID DLOG_P_1-DLOG_P_3 79 DLOGROI1-DLOGROI3 CONSTANT BENIGN MALIGN; 80 TITLE2 "Variables for Parenchyma analysis"; 81 NOTE: There were 10 observations read from the data set INOUT01.P0104. NOTE: The PROCEDURE PRINT printed page 3. NOTE: PROCEDURE PRINT used: real time 0.01 seconds 4 The SAS System 00:01 Saturday, August 19, 2000 cpu time 0.01 seconds NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 0.57 seconds cpu time 0.40 seconds