DM "output;clear;log;clear"; Options pagesize=45 linesize=80 PageNo=1 NoDate; ODS RTF File="C:\teaching\MATH581\bakery.rtf"; *this will make a pdf output file; ODS Listing Close; Data Bakery; input height $ width $ sales; cards; bot reg 47 bot reg 43 bot wide 46 bot wide 40 mid reg 62 mid reg 68 mid wide 67 mid wide 71 top reg 41 top reg 39 top wide 42 top wide 46 ; Proc GLM; /* Two-way ANOVA and Multiple Comparisons */ class height width; model sales=height|width; means height|width / tukey scheffe bon; output out=bakery p=yhat r=resid; run; Proc plot; plot yhat*height=width ; plot yhat*width=height ; plot resid*yhat='R' / vref=0 ; run; proc univariate normal plot; var resid; run; proc rank normal=vw; /* Computing ranked normal scores by residuals*/ var resid; ranks nscore; run; proc plot ; plot resid*nscore='R'; /*plotting ranked residual vs. normal score*/ label nscore='Normal Score'; run; proc corr; /* calculate correlation efficient btwn resid and nscore */ var resid nscore; run; Proc GLM; /* Effect of Height for each Width*/ class height width; model sales=height|width; contrast 'Regular Width only (bottom vs.mid)' height 1 -1 0 height*width 1 0 -1 0 0 0; estimate 'Regular Width only (bottom vs.mid)' height 1 -1 0 height*width 1 0 -1 0 0 0; contrast 'Wide Width only (bottom vs.mid)' height 1 -1 0 height*width 0 1 0 -1 0 0; estimate 'Wide Width only (bottom vs.mid)' height 1 -1 0 height*width 0 1 0 -1 0 0; run; ODS Listing; ODS RTF Close;