options nocenter ps=60 ls=75; goptions reset=all; data example; input trt block resp @@; cards; 1 1 73 1 2 74 1 4 71 2 2 75 2 3 67 2 4 72 3 1 73 3 2 75 3 3 68 4 1 75 4 3 72 4 4 75 ; proc glm; class block trt; model resp = block trt; lsmeans trt / pdiff tdiff adjust=bon stderr; contrast 'a' trt 1 -1 0 0; estimate 'b' trt 0 0 1 -1; run; proc mixed; class block trt; model resp=trt / ddfm=kr; random block; lsmeans trt / diff adjust=bon; contrast 'a' trt 1 -1 0 0; estimate 'b' trt 0 0 1 -1; run;