* test1q2.sas; * STT 646, test 1, question 1; ; options ls=72; ; data A; input x y; lines; 10 39.1 10 26.9 10 37.9 10 37.9 20 63.5 20 41.6 20 74.3 20 65.1 30 49.8 30 85.2 30 137.6 30 98.3 40 191.4 40 109.4 40 92.9 40 91.4 ; proc print; title 'STT 646, test 1, question 2.'; ; proc plot; plot y*x / vpos=20; title2 'Plot of the raw data.'; ; proc reg; model y = x; output out=B p=yhat r=e; ; proc plot; plot e*yhat / vpos=20; ; proc sort; by x; proc means noprint; by x; var y; output out=C mean=xbar var=s2; proc print; var x xbar s2; ; ; ; ; ; data C; set C; ln_xbar = log(xbar); ln_s2 = log(s2); proc plot; plot ln_s2*ln_xbar / vpos=20; STT 646, test 1, question 2. 1 14:45 Wednesday, October 8, 1997 OBS X Y 1 10 39.1 2 10 26.9 3 10 37.9 4 10 37.9 5 20 63.5 6 20 41.6 7 20 74.3 8 20 65.1 9 30 49.8 10 30 85.2 11 30 137.6 12 30 98.3 13 40 191.4 14 40 109.4 15 40 92.9 16 40 91.4 STT 646, test 1, question 2. 2 Plot of the raw data. 14:45 Wednesday, October 8, 1997 Plot of Y*X. Legend: A = 1 obs, B = 2 obs, etc. Y | 200 + | A | | | | | A | | A 100 + A | A B | A | B | | A A A | B | A | 0 + ---+----------------+----------------+----------------+-- 10 20 30 40 X STT 646, test 1, question 2. 3 Plot of the raw data. 14:45 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 16712.87112 16712.87112 20.526 0.0005 Error 14 11399.26825 814.23345 C Total 15 28112.13937 Root MSE 28.53478 R-square 0.5945 Dep Mean 77.64375 Adj R-sq 0.5655 C.V. 36.75090 Parameter Estimates Parameter Standard T for H0: Variable DF Estimate Error Parameter=0 Prob > |T| INTERCEP 1 5.375000 17.47391034 0.308 0.7629 X 1 2.890750 0.63805699 4.531 0.0005 STT 646, test 1, question 2. 4 Plot of the raw data. 14:45 Wednesday, October 8, 1997 Plot of E*YHAT. Legend: A = 1 obs, B = 2 obs, etc. | 100 + | | | | A R | e 50 + s | A i | d | u | a | A A A l 0 + B B | A A A | | A A | A | A -50 + ---+---------------+---------------+---------------+-- 34.28 63.19 92.10 121.01 Predicted Value of Y STT 646, test 1, question 2. 5 Plot of the raw data. 14:45 Wednesday, October 8, 1997 OBS X XBAR S2 1 10 35.450 32.81 2 20 61.125 192.08 3 30 92.725 1314.68 4 40 121.275 2252.06 STT 646, test 1, question 2. 6 Plot of the raw data. 14:45 Wednesday, October 8, 1997 Plot of LN_S2*LN_XBAR. Legend: A = 1 obs, B = 2 obs, etc. LN_S2 | 8 + | A | A | | | 6 + | | A | | | 4 + | | A | | | 2 + ---+---------+---------+---------+---------+---------+---------+-- 3.50 3.75 4.00 4.25 4.50 4.75 5.00 LN_XBAR