/* SAS Example 10: Unbalanced 2-way ANOVA: Correct Analysis */ /* A company has conducted a consumer research project to ascertain customer service ratings from its customers. The customers were asked to rate the company on a scale from 1 to 7 on various quality characteristics. One question was the promptness of company response to a repair problem. The following data represent customer responses to this question. The customers were divided by geographic region and by age. Use analysis of variance to analyze the responses. Let alpha = .01. */ OPTIONS PS=52; OPTIONS LS=78; OPTIONS NODATE; OPTIONS PAGENO=1; DATA COMPANY; INPUT AGE $1-16 REGION $17-27 RATING; CARDS; 21-35 Southeast 3 21-35 Southeast 2 21-35 Southeast 3 21-35 West 2 21-35 West 4 21-35 Midwest 3 21-35 Midwest 3 21-35 Midwest 2 21-35 Northeast 2 21-35 Northeast 3 21-35 Northeast 2 21-35 Northeast 3 36-50 Southeast 5 36-50 Southeast 5 36-50 West 4 36-50 West 4 36-50 West 6 36-50 West 4 36-50 Midwest 5 36-50 Midwest 6 36-50 Midwest 5 36-50 Northeast 6 36-50 Northeast 4 Over 50 Southeast 3 Over 50 Southeast 1 Over 50 Southeast 2 Over 50 Southeast 3 Over 50 West 2 Over 50 West 2 Over 50 West 3 Over 50 Midwest 3 Over 50 Midwest 2 Over 50 Midwest 3 Over 50 Northeast 3 Over 50 Northeast 2 Over 50 Northeast 1 ; RUN; PROC PRINT DATA=COMPANY; TITLE 'Company Service Ratings'; RUN; PROC GLM DATA=COMPANY; CLASS AGE REGION; MODEL RATING = AGE REGION AGE*REGION; LSMEANS AGE REGION AGE*REGION; RUN;