* golf.sas, STT 646 sample final exam; options ls=72; ; data golf; infile 'golf.dat'; input obs brand $ numhits; ; proc print; var brand numhits; ; proc plot; plot numhits*brand / vpos=20; ; proc glm; class brand; model numhits = brand; means brand; output out=stats r=e p=pred; ; proc rank normal=Blom; var e; ranks nscore; ; proc corr nosimple; var numhits e pred nscore; ; proc plot; plot e*pred / vpos=20 vref=0; plot e*nscore / vpos=20 vref=0 href=0; The SAS System 1 OBS BRAND NUMHITS 1 A 281 2 A 220 3 A 274 4 A 242 5 A 251 6 B 270 7 B 334 8 B 307 9 B 290 10 B 331 11 C 218 12 C 244 13 C 225 14 C 273 15 C 249 16 D 364 17 D 302 18 D 325 19 D 337 20 D 355 The SAS System 2 Plot of NUMHITS*BRAND. Legend: A = 1 obs, B = 2 obs, etc. NUMHITS | | 400 + | | | A 350 + A | A A | A A | A 300 + A | A | B A A | 250 + A B | A | A A | A 200 + | ---+---------------+---------------+---------------+-- A B C D BRAND The SAS System 3 General Linear Models Procedure Class Level Information Class Levels Values BRAND 4 A B C D Number of observations in data set = 20 The SAS System 4 General Linear Models Procedure Dependent Variable: NUMHITS Sum of Mean Source DF Squares Square Model 29860.400 Error 16 9698.400 606.150 Corrected Total The SAS System 5 General Linear Models Procedure Level of -----------NUMHITS----------- BRAND N Mean SD A 5 253.600000 24.6840029 B 5 306.400000 27.2084546 C 5 241.800000 21.6725633 D 5 336.600000 24.6028454 The SAS System 6 Correlation Analysis 4 'VAR' Variables: NUMHITS E PRED NSCORE Pearson Correlation Coefficients / Prob > |R| under Ho: Rho=0 / N = 20 NUMHITS E PRED NSCORE NUMHITS 1.00000 0.49514 0.86881 0.41900 0.0 0.0264 0.0001 0.0659 E 0.49514 1.00000 0.00000 0.97346 0.0264 0.0 1.0000 0.0001 PRED 0.86881 0.00000 1.00000 -0.07252 0.0001 1.0000 0.0 0.7613 NSCORE 0.41900 0.97346 -0.07252 1.00000 RANK FOR VARIABLE E 0.0659 0.0001 0.7613 0.0 The SAS System 7 Plot of E*PRED. Legend: A = 1 obs, B = 2 obs, etc. E | | 50 + | | | A 25 + A B A | A A | | A 0 +-A-------A---------------------------------A-------------------A--- | | A A | A A -25 + A | A | A A | -50 + | -+------------+------------+------------+------------+------------+- 240 260 280 300 320 340 PRED The SAS System 8 Plot of E*NSCORE. Legend: A = 1 obs, B = 2 obs, etc. E | | | | 50 + | | | | | | | A 25 + | A B A | | A A | | | | A 0 +--------------------------AA+AA-------------------------- | | | B | | A A | -25 + A | | A | | A A | | | -50 + | | | ---+------------+------------+------------+------------+-- -2 -1 0 1 2 RANK FOR VARIABLE E