options ls=75; data one; *infile "dist.dat" firstobs=2 dlm='09'x; /* data taken from exercise 15.5, "Statistical Research Methods in the Life Sciences" by PV Rao */ input block variety y; cards; 1 1 2.764 1 2 2.568 1 3 2.506 1 4 2.612 1 5 2.238 2 1 3.043 2 2 2.977 2 3 2.533 2 4 2.675 2 5 2.616 3 1 2.600 3 2 2.183 3 3 2.334 3 4 2.164 3 5 2.127 4 1 3.047 4 2 3.028 4 3 2.895 4 4 2.724 4 5 2.697 ; run; symbol1 i=j; symbol2 i=j; symbol3 i=j; symbol4 i=j; proc gplot; title "Distances in meters"; plot y*variety=block; run; proc glm; class block variety; model y=block variety; lsmeans variety/stderr; lsmeans variety/pdiff cl adj=tukey; estimate "v2-v1" variety -1 1; output out=two r=resid p=fitted; run; proc glm data=two; title "Tukey's test for nonadditivity of blocks and treatments"; class block variety; model y=block variety fitted*fitted; run; /* proc mixed method=type3; class block variety; model y=variety/ddfm=satterth; random block; lsmeans variety/adj=tukey cldiff; run; */ symbol1; symbol2; symbol3; symbol4; proc gplot; title "Check the residuals for inhomogeneity of variance"; plot resid*fitted; run;