OPTIONS PAGESIZE=55 LINESIZE=110 NODATE NONUMBER NOCENTER NOFMTERR; *****************************************************************; * Program Documentation Information ; %LET prg=Source: ejs09b540p05b.sas 9/16/2009 by ejs; * Name of SAS Program ; TITLE1 "&prg" ; * ; * Description: ; * Describing subjects in the Seasons Study ; * where subjects are divided into groups ; * ; * Input: ; * basev2.sas7bdat from Resouces on Public Health 540 Web site ; * baseline data from the Seasons study ; * Output: ; * Describe permanent data sets created from the program here; ******************************************************************; LIBNAME old v612 "c:\temp\"; *LIBNAME new v612 "C:\Documents and Settings\stanek\Desktop"; LIBNAME new "C:\Documents and Settings\stanek\Desktop"; * Include program statements next; TITLE2 " Program saved as Header.txt "; RUN; DATA d1; SET new.basev2; RUN; PROC CONTENTS DATA=d1; TITLE2 "Table 1. Contents of Baseline Data for the Seasons Study"; RUN; PROC UNIVARIATE DATA=d1 PLOT; VAR age; HISTOGRAM; TITLE2 "Table 2. Description of age in Seasons Study"; RUN; ******************************************************; *** Compare male and female subjects for energy intake; ******************************************************; PROC SORT DATA=d1; BY female; RUN; PROC UNIVARIATE DATA=d1 PLOT; * Plot creates side by side box plots; BY female; VAR energy; TITLE2 "Table 3. Description of Energy Intake by Gender (0=male, 1=female)"; RUN; FOOTNOTE "&prg"; PROC UNIVARIATE DATA=d1 NOPRINT PLOT; BY female; HISTOGRAM energy/MIDPOINTS=500 to 5000 by 500; *Creates common scale for histogram; TITLE1 "Figure 1. Histogram of Energy Intake for (0=Male, 1=Female"; RUN;