options nocenter ls=78; goptions colors=(none); data new; infile 'u:\.www\datasets1\glycogen.dat'; input trt $ resp; if trt="a" then horm=1; if trt="a" then level=1; if trt="A" then horm=1; if trt="A" then level=2; if trt="b" then horm=2; if trt="b" then level=1; if trt="B" then horm=2; if trt="B" then level=2; proc glm; class trt; model resp = trt; contrast 'level' trt 1 1 -1 -1; contrast 'hormone' trt 1 -1 1 -1; contrast 'interaction' trt 1 -1 -1 1; proc glm; class level horm; model resp = level horm level*horm / solution; means level|horm / tukey lines; lsmeans level horm level*horm / adjust=tukey tdiff; output out=new1 r=res p=pred; proc univariate noprint; hist res / normal (L=1 mu=0 sigma=est) kernel (L=2); symbol1 v=circle; axis1 offset=(5); proc gplot; plot res*pred res*level res*horm / haxis=axis1; run;