OPTIONS LINESIZE=72 PAGESIZE=55 NODATE NONUMBER NOCENTER; ******************************************************************; *** Program Name Date Disk Label Programmer ; TITLE1 "Source: PRET1.SAS 9/29/98 Ed Stanek "; * DESCRIPTION: Read in ICU Data to Illustrate PROC PRINT ; ******************************************************************; DATA icu; INFILE CARDS FIRSTOBS=11; INPUT icuid sta age sex race ser can crn inf cpr sys hra pre typ fra po2 ph pco bic cre loc; CARDS; The data in this file are those of Appendix 2 from Hosmer, D.W. and Lemeshow, S. (1989) Applied Logistic Regression, John Wiley and Sons, New York. They are reproduced here with the permission of the publisher and as such are copyright. R S A S A S C C I C S H P T F P P B C L I T G E C E A R N P Y R R Y R O P C I R O D A E X E R N N F R S A E P A 2 H O C E C 8 0 27 1 1 0 0 0 1 0 142 88 0 1 0 0 0 0 0 0 0 12 0 59 0 1 0 0 0 0 0 112 80 1 1 0 0 0 0 0 0 0 14 0 77 0 1 1 0 0 0 0 100 70 0 0 0 0 0 0 0 0 0 28 0 54 0 1 0 0 0 1 0 142 103 0 1 1 0 0 0 0 0 0 32 0 87 1 1 1 0 0 1 0 110 154 1 1 0 0 0 0 0 0 0 38 0 69 0 1 0 0 0 1 0 110 132 0 1 0 1 0 0 1 0 0 40 0 63 0 1 1 0 0 0 0 104 66 0 0 0 0 0 0 0 0 0 41 0 30 1 1 0 0 0 0 0 144 110 0 1 0 0 0 0 0 0 0 42 0 35 0 2 0 0 0 0 0 108 60 0 1 0 0 0 0 0 0 0 50 0 70 1 1 1 1 0 0 0 138 103 0 0 0 0 0 0 0 0 0 51 0 55 1 1 1 0 0 1 0 188 86 1 0 0 0 0 0 0 0 0 53 0 48 0 2 1 1 0 0 0 162 100 0 0 0 0 0 0 0 0 0 58 0 66 1 1 1 0 0 0 0 160 80 1 0 0 0 0 0 0 0 0 61 0 61 1 1 0 0 1 0 0 174 99 0 1 0 0 1 0 1 1 0 73 0 66 0 1 0 0 0 0 0 206 90 0 1 0 0 0 0 0 1 0 75 0 52 0 1 1 0 0 1 0 150 71 1 0 0 0 0 0 0 0 0 82 0 55 0 1 1 0 0 1 0 140 116 0 0 0 0 0 0 0 0 0 84 0 59 0 1 0 0 0 1 0 48 39 0 1 0 1 0 1 1 0 2 92 0 63 0 1 0 0 0 0 0 132 128 1 1 0 0 0 0 0 0 0 96 0 72 0 1 1 0 0 0 0 120 80 1 0 0 0 0 0 0 0 0 98 0 60 0 1 0 0 0 1 1 114 110 0 1 0 0 0 0 0 0 0 100 0 78 0 1 1 0 0 0 0 180 75 0 0 0 0 0 0 0 0 0 ; PROC PRINT DATA=icu; VAR icuid age ser can crn ; TITLE2 "Table 1. Basic Data for Illustration of PROC PRINT"; RUN; *****************************************************************; *** Detailed statements illustrating Making OUTPUT PRETTY *; *****************************************************************; DATA icu1; SET icu; LABEL icuid ="ID ICUID" sta ="Vital Status STA" ser ="Service at ICU Admission SER" can ="Cancer Present? CAN" crn ="Chronic/Renal/Failure?/CRN" inf ="Infection/Probable?/INF" cpr ="CPR/Prior/to Admit?/CPR" sys ="Systolic/Blood/Pressure/SYS" hra ="Heart/Rate/HRA" pre ="Previous/Admission/in 6mths?/PRE" typ ="Type/of/Admission/TYP" fra ="Fracture?/FRA" po2 ="PO2 from/Blood/Gas/PO2" ph ="PH from Blood Gas PH" pco ="PCO2 from/Blood/Gas/PCO" bic ="Bicarbonate/From/Blood/Gas/BIC" cre ="Creatinine/CRE" loc ="Level/of/Consciousness/LOC"; PROC CONTENTS DATA=icu1; TITLE2 "Table 1a1. Effect of adding Labels in Contents"; PROC PRINT DATA=icu1 LABEL; ID icuid; VAR age sta ser can ph ; TITLE2 "Table 1a2. Adding Simple Variable Labels"; DATA icu2; SET icu1; LABEL icuid ="ID/ICUID" crn ="Chronic/Renal/Failure?/CRN" inf ="Infection/Probable?/INF" cpr ="CPR/Prior/to Admit?/CPR" ph ="PH/from/Blood/Gas/PH"; PROC PRINT DATA=icu2 SPLIT="/"; ID icuid; VAR age sex crn inf cpr ph; TITLE2 "Table 1b. Labels with Forced Splits"; DATA icu3; SET icu2; LABEL ph =" "; PROC PRINT DATA=icu3 SPLIT="/"; ID icuid; VAR age sex crn inf cpr ph; TITLE2 "Table 1c. Removing Label for PH by setting LABEL to single blank"; RUN;