options ls=65 ps=50; data a; input y period trt subject restrt @@; datalines; 16 1 1 1 0 19 1 2 2 0 23 1 3 3 0 17 1 4 4 0 23 2 2 1 1 18 2 3 2 2 12 2 4 3 3 28 2 1 4 4 24 3 4 1 2 26 3 1 2 3 25 3 2 3 4 21 3 3 4 1 15 4 3 1 4 17 4 4 2 1 19 4 1 3 2 20 4 2 4 3 ; run; proc glm; class period trt subject restrt; model y=period trt subject restrt/solution e; /* lack of balance in restrt means Treatment means are not estimable */ lsmeans trt restrt; run; proc glimmix plots=all; class period trt subject restrt; model y=period trt subject restrt/solution; /* lack of balance in restrt means Treatment means are not estimable */ /* Differences are estimable, but no graphic is produced. */ lsmeans trt restrt/pdiff adjust=tukey cl; run;