* f97t1q1.sas; * STT 646, test 1, question 1; ; options ls=72; data calls; input callno x y; A=x; lines; 1 4 109 2 2 58 3 5 138 4 7 189 5 1 37 6 3 82 7 4 103 8 5 134 9 2 68 10 4 112 11 6 154 ; proc print; title 'STT 646, test 1, question 1.'; ; proc plot; plot y*x / vpos=25; ; proc reg; model y = x; output out=B p=yhat r=e; title2 'Simple linear regression.'; ; proc rank normal=Blom; var e; ranks nscore; ; proc print; ; proc plot; plot e*x e*callno e*yhat e*nscore / vpos=20 vref=0; ; proc glm; class x; model y = x; ; proc corr nosimple; var e nscore; ; proc sort; by x; proc means noprint n var; by x; var y; output out=means n=n var=s2; proc print; var x n s2; STT 646, test 1, question 1. 1 11:47 Wednesday, October 8, 1997 OBS CALLNO X Y A 1 1 4 109 4 2 2 2 58 2 3 3 5 138 5 4 4 7 189 7 5 5 1 37 1 6 6 3 82 3 7 7 4 103 4 8 8 5 134 5 9 9 2 68 2 10 10 4 112 4 11 11 6 154 6 STT 646, test 1, question 1. 2 11:47 Wednesday, October 8, 1997 Plot of Y*X. Legend: A = 1 obs, B = 2 obs, etc. 200 + | A | | | | 150 + A | A | A Y | | | B 100 + A | | A | | A | A 50 + | |A | | | 0 + -+----------+----------+----------+----------+----------+----------+ 1 2 3 4 5 6 7 X STT 646, test 1, question 1. 3 Simple linear regression. 11:47 Wednesday, October 8, 1997 Model: MODEL1 Dependent Variable: Y Analysis of Variance Sum of Mean Source DF Squares Square F Value Prob>F Model 1 19918.84380 19918.84380 935.149 0.0001 Error 9 191.70166 21.30018 C Total 10 20110.54545 Root MSE 4.61521 R-square 0.9905 Dep Mean 107.63636 Adj R-sq 0.9894 C.V. 4.28778 Parameter Estimates Parameter Standard T for H0: Variable DF Estimate Error Parameter=0 Prob > |T| INTERCEP 1 11.464088 3.43902571 3.334 0.0087 X 1 24.602210 0.80451424 30.580 0.0001 STT 646, test 1, question 1. 4 Simple linear regression. 11:47 Wednesday, October 8, 1997 OBS CALLNO X Y A YHAT E NSCORE 1 1 4 109 4 109.873 -0.87293 -0.22469 2 2 2 58 2 60.669 -2.66851 -0.46149 3 3 5 138 5 134.475 3.52486 0.72791 4 4 7 189 7 183.680 5.32044 1.06056 5 5 1 37 1 36.066 0.93370 0.22469 6 6 3 82 3 85.271 -3.27072 -0.72791 7 7 4 103 4 109.873 -6.87293 -1.59322 8 8 5 134 5 134.475 -0.47514 0.00000 9 9 2 68 2 60.669 7.33149 1.59322 10 10 4 112 4 109.873 2.12707 0.46149 11 11 6 154 6 159.077 -5.07735 -1.06056 STT 646, test 1, question 1. 5 Simple linear regression. 11:47 Wednesday, October 8, 1997 Plot of E*X. Legend: A = 1 obs, B = 2 obs, etc. | | 10 + | | A | R 5 + A e | A s | A i | A d 0 +------------------------------------------A---------------------- u | A a | A l | A -5 + A | A | | -10 + | ---+---------+---------+---------+---------+---------+---------+-- 1 2 3 4 5 6 7 X STT 646, test 1, question 1. 6 Simple linear regression. 11:47 Wednesday, October 8, 1997 Plot of E*CALLNO. Legend: A = 1 obs, B = 2 obs, etc. | | 10 + | | A | R 5 + A e | A s | A i | A d 0 +--------------------------------------------A-------------------- u | A a | A l | A -5 + A | A | | -10 + | ---+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-- 1 2 3 4 5 6 7 8 9 10 11 CALLNO STT 646, test 1, question 1. 7 Simple linear regression. 11:47 Wednesday, October 8, 1997 Plot of E*YHAT. Legend: A = 1 obs, B = 2 obs, etc. | | 10 + | | A | R 5 + A e | A s | A i | A d 0 +------------------------------------------A---------------------- u | A a | A l | A -5 + A | A | | -10 + | ---+---------+---------+---------+---------+---------+---------+-- 36.07 60.67 85.27 109.87 134.48 159.08 183.68 Predicted Value of Y STT 646, test 1, question 1. 8 Simple linear regression. 11:47 Wednesday, October 8, 1997 Plot of E*NSCORE. Legend: A = 1 obs, B = 2 obs, etc. | | 10 + | | A | R 5 + A e | A s | A i | A d 0 +----------------------------A---------------------------- u | A a | A l | A -5 + A | A | | -10 + | ---+------------+------------+------------+------------+-- -2 -1 0 1 2 RANK FOR VARIABLE E STT 646, test 1, question 1. 9 Simple linear regression. 11:47 Wednesday, October 8, 1997 General Linear Models Procedure Class Level Information Class Levels Values X 7 1 2 3 4 5 6 7 Number of observations in data set = 11 STT 646, test 1, question 1. 10 Simple linear regression. 11:47 Wednesday, October 8, 1997 General Linear Models Procedure Dependent Variable: Y Sum of Mean Source DF Squares Square F Value Pr > F Model 6 20010.545 3335.091 133.40 0.0001 Error 4 100.000 25.000 Corrected Total 10 20110.545 R-Square C.V. Root MSE Y Mean 0.995027 4.645270 5.0000 107.64 Source DF Type I SS Mean Square F Value Pr > F X 6 20010.545 3335.091 133.40 0.0001 Source DF Type III SS Mean Square F Value Pr > F X 6 20010.545 3335.091 133.40 0.0001 STT 646, test 1, question 1. 11 Simple linear regression. 11:47 Wednesday, October 8, 1997 Correlation Analysis 2 'VAR' Variables: E NSCORE Pearson Correlation Coefficients / Prob > |R| under Ho: Rho=0 / N = 11 E NSCORE E 1.00000 0.99730 Residual 0.0 0.0001 NSCORE 0.99730 1.00000 RANK FOR VARIABLE E 0.0001 0.0 STT 646, test 1, question 1. 12 Simple linear regression. 11:47 Wednesday, October 8, 1997 OBS X N S2 1 1 1 . 2 2 2 50 3 3 1 . 4 4 3 21 5 5 2 8 6 6 1 . 7 7 1 .