options nocenter ls=80; data example1; input trt x y @@; cards; 1 1.2 7 1 1.9 13 1 3.4 16 2 4.0 20 2 5.2 22 2 5.8 32 3 7.7 31 3 8.3 45 3 8.9 42 ; proc sort; by trt; symbol1 v=circle i= c=black; symbol2 v=square i= c=black; symbol3 v=triangle i= c=black; proc gplot; plot y*x=trt; run; proc glm; class trt; model y=trt; output out=resid r=resy; proc glm; class trt; model x=trt; output out=resid1 r=resx; proc glm; model resy=resx; symbol1 v=circle i=rl; proc gplot; plot resy*resx; run; proc glm data=example1; class trt; model y=trt x / solution; means trt /lines lsd; lsmeans trt / tdiff adjust=t; run;