* Read in the data; PROC IMPORT DATAFILE = 'C:\Documents and Settings\richc\My Documents\STA570S12\TABLE213.xls' OUT = Serum DBMS = EXCEL REPLACE; SHEET = Sheet1; GETNAMES = YES; RUN; * Print the data; PROC PRINT data = Serum; RUN; * Tell SAS that the output is to be written to a PDF file; ODS PDF FILE = 'C:\Documents and Settings\richc\My Documents\STA570S12\TABLE213.pdf'; * Obtain numerical and graphical summaries of the data; title 'Serum cholesterol changes'; PROC UNIVARIATE data = Serum plots; var Difference; Histogram / cfill = ywh midpoints = -20 to 50 by 10; RUN; title 'Serum cholesterol changes'; PROC BOXPLOT data = Serum; plot Difference*Sample / boxstyle = schematic nohlabel cframe = vligb cboxes = dagr cboxfill = ywh; RUN; * Obtain numerical and graphical summaries for different groups; title 'Serum cholesterol changes by gender'; PROC UNIVARIATE data = Serum plots; by Gender; var Difference; Histogram / cfill = ywh midpoints = -20 to 50 by 10; RUN; title 'Serum cholesterol changes by gender'; PROC BOXPLOT data = Serum; plot Difference*Gender / boxstyle = schematic cframe = vligb cboxes = dagr cboxfill = ywh; RUN; * Signal SAS that you are done writing output to a PDF file; ODS PDF CLOSE; RUN;