options ls=80 ps=60 nodate; proc reg data=Work.Ch15q01; model Y = X /p r SS1; plot r.*p.; plot Y*X p.*X / overlay; title 'Results from PROC REG Y = X'; run; proc rsreg data=Work.Ch15q01; model Y = X / lackfit /* do the lack of fit test */ noopt; /* suppress some output */ title 'Results from PROC RSREG Y = X'; run; quit; proc reg data=Work.Ch15q01; model LN_Y = X /p r; plot r.*p.; plot LN_Y*X p.*X / overlay; title 'Results from PROC RSREG LN_Y = X'; run; proc rsreg data=Work.Ch15q01; model LN_Y = X / lackfit /* do the lack of fit test */ noopt; /* suppress some output */ title 'Results from PROC RSREG LN_Y = X'; run; quit; goptions reset=all gunit=pct ftext=swiss htext=3 target=winprtc rotate=landscape device=java; axis1 label=('X'); axis2 label=(angle=90 'Y'); symbol1 v=dot i=rl width=2 cv=black ci=red; symbol2 v=dot i=rlclm90 width=2 cv=black ci=red co=green; symbol3 v=dot i=rlcli90 width=2 cv=black ci=red co=green; symbol4 v=dot i=rl0 width=2 cv=black ci=red; symbol5 v=dot i=rq width=2 cv=black ci=red; symbol6 v=dot i=rc width=2 cv=black ci=red; proc gplot data=Work.Ch15q01; title2 'Simple Linear Regression and Quadratic Regression'; plot Y*X=1 Y*X=5/haxis=axis1 vaxis=axis2 regeqn overlay; run; title2 'Simple Linear Regression with 90% Confidence Limits for Mean Predicted Values'; plot Y*X=2/haxis=axis1 vaxis=axis2 regeqn; run; title2 'Simple Linear Regression with 90% Confidence Limits for Individual Predicted Values'; plot Y*X=3/haxis=axis1 vaxis=axis2 regeqn; run; title2 'Simple Linear regression through the origin'; plot Y*X=4/haxis=axis1 vaxis=axis2 regeqn hzero vzero; run; title2 'Quadratic Regression'; plot Y*X=5/haxis=axis1 vaxis=axis2 regeqn; run; title2 'Cubic Regression'; plot Y*X=6/haxis=axis1 vaxis=axis2 regeqn; run; quit;