OPTIONS LS=72 PS=55 NODATE NONUMBER NOCENTER; ******************************************************; *** Program Date Disk Programmer ; TITLE1 "Source: CHARTP1.SAS 9/24/98 Ed Stanek "; * DESCRIPTION: ; * a. Obtaining charts ; * b. Obtaining historgrams ; * c. Attaching formats to discete value ; * using ICU.SD2 created from icu.dat ; * Examples of PROC CHART, PROC FORMAT ; ******************************************************; *****************************; *** Read ICU Study data ***; *****************************; DATA icu; INFILE 'c:\temp\icu.dat' FIRSTOBS=11; INPUT id sta age sex race ser can crn inf cpr sys hra pre typ fra po2 ph pco bic cre loc; PROC FORMAT; VALUE sexf 0="Male" 1="Female"; VALUE staf 0="Live" 1="Die"; DATA icu1; SET icu; FORMAT sex sexf. sta staf.; PROC CHART DATA=icu1; VBAR sex /DISCRETE; TITLE2 "Figure 1. Frequency Distribution of Gender in Intensive Care Unit Study"; OPTIONS PAGESIZE=30; PROC CHART DATA=icu1; VBAR sex /DISCRETE GROUP=sta; TITLE2 "Figure 2. Frequency Distribution of Gender by Survival Status"; TITLE3 " for subjects in the Intensive Care Unit Study"; PROC CHART DATA=icu1; VBAR sex /DISCRETE GROUP=sta TYPE=PERCENT; TITLE2 "Figure 3. Percent Frequency Distribution of Gender by Survival Status"; TITLE3 " for subjects in the Intensive Care Unit Study"; PROC CHART DATA=icu1; VBAR age / SPACE=0; TITLE2 "Figure 4. Frequency Distribution of Age for Subjects in the "; TITLE3 " Intensive Care Unit Study"; PROC MEANS DATA=icu1; VAR age; TITLE2 "Table 1. Summary Statistics for Age"; TITLE3 " Intensive Care Unit Study"; PROC CHART DATA=icu1; VBAR age / MIDPOINTS=10 TO 90 BY 10 SPACE=0; TITLE2 "Figure 5. Frequency Distribution of Age for Subjects in the "; TITLE3 " Intensive Care Unit Study"; PROC CHART DATA=icu1; VBAR age / MIDPOINTS=10 TO 90 BY 10 SPACE=0 TYPE=PERCENT; TITLE2 "Figure 6. Percent Relative Frequency Distribution of Age for Subjects in the "; TITLE3 " Intensive Care Unit Study"; PROC CHART DATA=icu1; VBAR age / MIDPOINTS=10 TO 90 BY 10 SPACE=0 TYPE=CPERCENT; TITLE2 "Figure 7. Cumulative Percent Distribution of Age for Subjects in the "; TITLE3 " Intensive Care Unit Study"; RUN;