* Example SAS Program; * Summary information about employees; * OPTIONS:; * For UNIX lineprinter mode, the default is 120 columns, has * around 20 lines per page, and centers printed output. * Saying `ls=75 ps=60 nocenter' fixes this. * Windows SAS increments page numbers until you exit the program, * so that your first usable output might begin as `Page 76'. * Saying `pageno=1' makes sure that output starts at Page 1.; options ls=75 ps=60 nocenter pageno=1; data list1; * `$' means that the preceding variable is text, not numerical; input name $ region $ salary; if salary<10000 then income='Low '; else income='High'; datalines; Michael NW 9635 George NW 12393 Helen SE 9465 Linda S 11549 Rebecca SE 7398 Jill NW 11762 Margaret SE 11550 Bettie S 10983 run; * Display the data set; title 'Salaries'; proc print; run; * Display a 2x3 table of income levels by region; proc freq; table income*region; run; * Scatterplot of salary(Y) by region(X) with the first initial of the person's name as the plotting symbol In lineprinter mode, options ps=40 gives nicer output. Otherwise, SAS will use a full page for the scatterplot.; options ps=40; proc plot; plot salary*region=name; run; * Display summary statistics for salary for different regions; proc means sum mean min max; class region; var salary; run;