From proc mixed documentation:
SLICE= fixed-effect | (fixed-effects)
specifies effects by which to partition interaction LSMEANS effects. This can produce what are known as tests of simple effects (Winer 1971). For example, suppose that A
*B
is significant, and you want to test the effect of A
for each level of B
. The appropriate LSMEANS statement is as follows:
lsmeans A*B / slice=B;
Since HARVEST has no interaction term in the first part of the LSMEANS, (and no other variables in the model statement to interact with) the slice option has nothing to partition.
I believe this syntax should use the slice option but whether the model is what you need or want is another story:
proc mixed;
class legume trt harvest;
model sorgyd = harvest legume trt;
random block;
lsmeans harvest*trt / slice=harvest diff;
contrast 'cut 1 vs cut 2' harvest 1 -1 0 0;
contrast 'cut 1 vs cut 3' harvest 1 0 -1 0;
contrast 'cut 1 vs cut 4' harvest 1 0 0 -1;
contrast 'cut 2 vs cut 3' harvest 0 1 -1 0;
contrast 'cut 2 vs cut 4' harvest 0 1 0 -1;
contrast 'cut 3 vs cut 4' harvest 0 0 1 -1;
run;