/* wheatprot.sas */ options ls=72 ps=60; data wheat; infile 'wheatprot.dat'; input yield protein; yield2 = yield*yield; proc print data=wheat; title 'wheat protein data'; proc plot data=wheat; plot protein*yield; title 'wheat protein data scatterplot'; proc glm data=wheat; model protein = yield / ss1 ss2 p; output out=new1 predicted=yhat residual=resid; title 'simple linear regression of protein on yield'; proc plot data=new1; plot resid*yield / vref=0; title 'residual plot: regression of protein on yield'; proc glm data=wheat; model protein = yield yield2 / ss1 ss2 p; output out=new2 predicted=yhat2 residual=resid2 lcl=clpl ucl=clpu lclm=clml uclm=clmu; title 'quadratic regression of protein on yield'; proc print data=new2; var protein yield clml clmu clpl clpu yhat2 resid2; proc plot data=new2; plot resid2*yield / vref=0; title 'residual plot: quadratic model'; proc univariate data=new2 plot; var resid2; title 'descriptive statistics for residuals'; proc rank data=new2 normal=blom out=new2a; var resid2; ranks nscore; proc plot data=new2a; plot nscore*resid2; title 'normal probability plot for residuals'; run;