/* SAS Example 6: Chapter 11.2 Question 11.12 */ /* That the starting salaries of new accounting graduates would differ according to geographic regions of the United States seems logical. A random selection of accounting firms is taken from three geographic regions, and each is asked to state the starting salary for a new accounting graduate who is going to work in auditing. Use a 1% level of significance */ OPTIONS PS=52; OPTIONS LS=78; OPTIONS NODATE; OPTIONS PAGENO=1; DATA SALARY; INPUT REGION $ SALARY; CARDS; South 28000 South 29000 South 27500 South 28500 South 29000 Northeast 38500 Northeast 37000 Northeast 36500 Northeast 35500 Northeast 37000 West 33000 West 31000 West 32500 West 34000 West 33500 ; RUN; PROC PRINT DATA=SALARY; TITLE 'Regional Starting Salary Data'; RUN; /* The PROC GLM statement is what we will use for our one-way ANOVA. We could have used PROC ANOVA to get the same results, however, PROC ANOVA will give incorrect results if we use it with unbalanced designs */ PROC GLM; TITLE 'One-way ANOVA for Regional Starting Salary Data'; /* Our class statement is where we define the classification or treatment variable whose levels we want to look for a difference between */ CLASS REGION; MODEL SALARY = REGION; /* The means statement will show us the mean of our response variable at all levels of the explanatory variables that we list. In the case below, we are asking for the mean salary for each region. */ MEANS REGION /TUKEY ; RUN;