option nocenter ps=65 ls=75; data lambs; input diet wtgain @@; cards; 1 8 1 16 1 9 2 9 2 16 2 21 2 11 2 18 3 15 3 10 3 17 3 6 ; /* Generate side by side boxplots */ symbol1 bwidth=5 i=box; axis1 offset=(5); proc gplot; plot wtgain*diet / frame haxis=axis1; /* Use GLM instead of REG */ proc glm; class diet; model wtgain=diet; output out=diag r=res p=pred; /* Generate a residual boxplots */ proc gplot; plot res*diet /frame haxis=axis1; /* Generate residual plot and horizontal line at zero */ proc sort; by pred; symbol1 v=circle i=sm50; proc gplot; plot res*pred / haxis=axis1; run; quit;